GLXBadFBConfig with SDL2, OpenGL 3.2, bumblebee/virtualgl

Hi,
while attempting to create an OpenGL 3.2 context with SDL2 (Mercurial revision 7303), I’m receiving the following error when calling SDL_GL_CreateContext():

Code:
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 183
Current serial number in output stream: 182

The problem is reproducible using the example code from http://www.opengl.org/wiki/Tutorial1:Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL%28C_/_SDL%29

The machine in question uses Nvidia Optimus-style graphics with both Intel and Nvidia graphics chips (i915 and Quadro NVS 4200M). I use Bumblebee (http://bumblebee-project.org) to manage this on Linux. The Intel chip only supports up to OpenGL 3.1 (according to glxinfo) and I can create an OpenGL 3.1 context without issue. The Nvidia chip supports up to OpenGL 4.3 according to glxinfo with the latest proprietary drivers (319.23).

However, I have no problem creating and using an OpenGL 3.2 context with GLFW. Therefore I suspect this is either a) a problem with SDL or b) my use of SDL.

Please let me know what other information would be useful. Any help would be appreciated. Thanks!

I’ve had some issue with gl3.h in the past. Did you try glew? That’s
worked for me, without fail. I haven’t used bumblebee before, so I can’t
say whether the issue is directly related, however, because bumblebee does
deal in the frame buffer between two chips, I’m going to assume your
problem lies there. On top of this thread, you may want to open a new
issue on their github
trackerhttps://github.com/Bumblebee-Project/Bumblebee/issues
.On Mon, Jun 10, 2013 at 11:47 PM, RocketSurgeon wrote:

**
Hi,
while attempting to create an OpenGL 3.2 context with SDL2 (Mercurial
revision 7303), I’m receiving the following error when calling
SDL_GL_CreateContext():

Code:

X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 183
Current serial number in output stream: 182

The problem is reproducible using the example code from
http://www.opengl.org/wiki/Tutorial1:Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL%28C_/_SDL%29

The machine in question uses Nvidia Optimus-style graphics with both Intel
and Nvidia graphics chips (i915 and Quadro NVS 4200M). I use Bumblebee (
http://bumblebee-project.org) to manage this on Linux. The Intel chip
only supports up to OpenGL 3.1 (according to glxinfo) and I can create an
OpenGL 3.1 context without issue. The Nvidia chip supports up to OpenGL 4.3
according to glxinfo with the latest proprietary drivers (319.23).

However, I have no problem creating and using an OpenGL 3.2 context with
GLFW. Therefore I suspect this is either a) a problem with SDL or b) my use
of SDL.

Please let me know what other information would be useful. Any help would
be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

From someone who’s familiar with driver issues:
"Seems like some of the GLX calls aren’t getting hooked properly by
VirtualGL in this case. Can you ask him if it also happens with Primus?"On Mon, Jun 10, 2013 at 8:47 PM, RocketSurgeon wrote:

**
Hi,
while attempting to create an OpenGL 3.2 context with SDL2 (Mercurial
revision 7303), I’m receiving the following error when calling
SDL_GL_CreateContext():

Code:

X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 183
Current serial number in output stream: 182

The problem is reproducible using the example code from
http://www.opengl.org/wiki/Tutorial1:Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL%28C_/_SDL%29

The machine in question uses Nvidia Optimus-style graphics with both Intel
and Nvidia graphics chips (i915 and Quadro NVS 4200M). I use Bumblebee (
http://bumblebee-project.org) to manage this on Linux. The Intel chip
only supports up to OpenGL 3.1 (according to glxinfo) and I can create an
OpenGL 3.1 context without issue. The Nvidia chip supports up to OpenGL 4.3
according to glxinfo with the latest proprietary drivers (319.23).

However, I have no problem creating and using an OpenGL 3.2 context with
GLFW. Therefore I suspect this is either a) a problem with SDL or b) my use
of SDL.

Please let me know what other information would be useful. Any help would
be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org