tksuoran's picture

X11GLContext could check for driver version?

The current X11GLContext hangs on some older drivers when it tries to create 3.0 context using the new context creation method. Would it be possible to check GL version before trying to do that? This way I could get an error to the user about unsupported GL version instead of my app just hanging.

The current GL context creation is a bit funny IMHO. Even if I ask for 3.3 forward compatible context I might get much older context through fallbacks. So I need to check myself if I got what I wanted.

Snippet from glxinfo output:

GLX version: 1.4
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_ARB_multisample, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 7600 GS/PCI/SSE2
OpenGL version string: 2.1.2 NVIDIA 195.36.31
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tksuoran's picture

A bit more information: It is Glx.Arb.CreateContextAttribs that hangs.

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9500 GT/PCI/SSE2
OpenGL version string: 3.2.0 NVIDIA 195.36.31
OpenGL shading language version string: 1.50 NVIDIA via Cg compiler

Ask for 3.3 context on this and it hangs. I modified my code to ask for only 3.0 version, and the my app works (or at least gets GL context...)

the Fiddler's picture

Interesting, I have the same card. Let me see if I can reproduce this. Are you requesting a ForwardCompatible context?

Edit: I don't think 195.* drivers support OpenGL 3.3. For that you will need something closer to 258.* or 260.*.

tksuoran's picture

Yes, you need newer drives. But not all of my testers are willing to install new drivers, and not everyone will have those. I think we should care about these people as well. At minimum I would like to display a nice message suggesting to get the latest drivers. Instead of just hanging without any message at all.

Yes, at least I tried to ask for forward compatible context, I don't remember if I also tried without it.