bds icon indicating copy to clipboard operation
bds copied to clipboard

"uniform_buffer: minimum extensions not met" on Ubuntu

Open popey opened this issue 7 years ago • 10 comments

Thanks for making mgl and bds available. I built mgl and bds from source. But bds fails to launch on my Ubuntu machine.

$ bds
x_window: opening X11 opengl context version 3.3
Beyond Dying Skies failed to launch!
uniform_buffer: minimum extensions not met

Other GL applications (steam, games) work fine.

It's got an nvidia GPU and running the nvidia binary driver 390.67

popey avatar Aug 07 '18 18:08 popey

I will check this right now.

Aaron-SP avatar Aug 07 '18 19:08 Aaron-SP

The problem is https://github.com/Aaron-SP/mgl/blob/master/source/renderer/min/uniform_buffer.h because GLEW_ARB_uniform_buffer_object is not defined on the system.

Open bash and run... glxinfo

Post the top part about OpenGL extensions. It likely is not being defined by the driver.

Looking for GL_ARB_uniform_buffer_object specifically.

Aaron-SP avatar Aug 07 '18 19:08 Aaron-SP

Try https://github.com/Aaron-SP/mgl/commit/6b48e837ab7f9d2a9e78718a4ff9d21f3d39e073.

Basically you should have support for that feature with OpenGL 3.1 so I changed it to only test if you don't have core compatibility.

You will need to update MGL, uninstall BDS, rebuild BDS, and install BDS to get the update.

Aaron-SP avatar Aug 07 '18 20:08 Aaron-SP

Thanks for the quick response. Here's my glxinfo. Unfortunately I rebuilt everything and now it fails interestingly.

$ bds
x_window: opening X11 opengl context version 3.3
terminate called after throwing an instance of 'std::runtime_error'
  what():  GL ERROR! glGetError(): 1280
Aborted (core dumped)

popey avatar Aug 07 '18 20:08 popey

Well you have the extension so something isn't quite correct. I would rollback MGL to the previous commit since it catches the problem instead of ignoring it. You can do this using git with "git reset --hard HEAD~" inside the MGL folder.

When building the game try "make MGL_VB43=true all" instead of "make all". This will force the game to run OpenGL 4.3. Your GPU should handle this no problem.

Let's see if it throws the same error about GLEW_ARB_uniform_buffer_object.

Aaron-SP avatar Aug 07 '18 22:08 Aaron-SP

:(

x_window: opening X11 opengl context version 4.3
Beyond Dying Skies failed to launch!
uniform_buffer: minimum extensions not met

popey avatar Aug 07 '18 22:08 popey

I didn't expect that to work, but it is interesting that the extension isn't defined in the first place. I rolled back that last commit because I prefer to error out than crash in a bizarre fashion.

First thing I would try is to do a system update, if it is not up to date.

Next go to https://github.com/Aaron-SP/mgl/blob/master/source/platform/min/x_window.h and delete line 330 "GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,". This really shouldn't do anything but we will see.

Aaron-SP avatar Aug 07 '18 22:08 Aaron-SP

Also after thinking about this, do you have two graphics cards? See this at step 4. If you did that would make sense since it might be trying to load the game on an integrated card.

Also there is a newer NVIDIA driver out, here. I know people have gotten this to run on NVIDIA, but I would like to rule out an NVIDIA driver bug if you feel adventurous.

Aaron-SP avatar Aug 08 '18 00:08 Aaron-SP

It's a laptop and it doesn't support PRIME.

Removed the line from x_window.h and it made no difference.

x_window: opening X11 opengl context version 4.3
Beyond Dying Skies failed to launch!
uniform_buffer: minimum extensions not met

popey avatar Aug 08 '18 11:08 popey

I dug through the GLEW source and I think the problem is when trying to load OpenGL 3.0 function pointers.

Paste this code on line 396 of x_window.h. After rebuilding it should tell us exactly what the issue is. This is most likely a driver issue, but I will wait and see what the results are. Don't include the ' ` ' marks.

`

// OpenGL Debugging

    if (GLEW_VERSION_1_2)
        std::cout << "GLEW_VERSION_1_2" << std::endl;

    if (GLEW_VERSION_1_3)
        std::cout << "GLEW_VERSION_1_3" << std::endl;

    if (GLEW_VERSION_1_4)
        std::cout << "GLEW_VERSION_1_4" << std::endl;

    if (GLEW_VERSION_1_5)
        std::cout << "GLEW_VERSION_1_5" << std::endl;

    if (GLEW_VERSION_2_0)
        std::cout << "GLEW_VERSION_2_0" << std::endl;

    if (GLEW_VERSION_2_1)
        std::cout << "GLEW_VERSION_2_1" << std::endl;

    if (GLEW_VERSION_3_0)
        std::cout << "GLEW_VERSION_3_0" << std::endl;

    if (GLEW_VERSION_3_1)
        std::cout << "GLEW_VERSION_3_1" << std::endl;

    if (GLEW_VERSION_3_2)
        std::cout << "GLEW_VERSION_3_2" << std::endl;

    if (GLEW_VERSION_3_3)
        std::cout << "GLEW_VERSION_3_3" << std::endl;

    if (GLEW_VERSION_4_0)
        std::cout << "GLEW_VERSION_4_0" << std::endl;

    if (!glBindBufferBase)
        std::cout << "glBindBufferBase is NULL!" << std::endl;

    if (!glBindBufferRange)
        std::cout << "glBindBufferRange is NULL!" << std::endl;

    if (!glGetActiveUniformBlockName)
        std::cout << "glGetActiveUniformBlockName is NULL!" << std::endl;

    if (!glGetActiveUniformBlockiv)
        std::cout << "glGetActiveUniformBlockiv is NULL!" << std::endl;

    if (!glGetActiveUniformName)
        std::cout << "glGetActiveUniformName is NULL!" << std::endl;

    if (!glGetActiveUniformsiv)
        std::cout << "glGetActiveUniformsiv is NULL!" << std::endl;

    if (!glGetIntegeri_v)
        std::cout << "glGetIntegeri_v is NULL!" << std::endl;

    if (!glGetUniformBlockIndex)
        std::cout << "glGetUniformBlockIndex is NULL!" << std::endl;

    if (!glGetUniformIndices)
        std::cout << "glGetUniformIndices is NULL!" << std::endl;

    if (!glUniformBlockBinding)
        std::cout << "glUniformBlockBinding is NULL!" << std::endl;

`

Aaron-SP avatar Aug 08 '18 13:08 Aaron-SP