1

I am creating a wx.Frame with a GLCanvas. On some platforms, setting the WX_GL_DEPTH_SIZE attribute of the canvas to 32 works fine. On another platform, I just get a blank frame (the GLCanvas doesn't render) unless I reduce the depth size to 16. Is there an easy way in the calling code to determine the allowable values for the depth size?

2 Answers 2

1

Are you running Linux? Perhaps you could get that information from the table of display modes that glxinfo -t outputs.

2
  • I'm currently running on RHEL and OS X (both of which have glxinfo) but the code is also used by Windows users so I would like to find a platform-independent way of pulling that info. +1 for something that will work on unix/linux-based systems.
    – bogatron
    Commented Feb 20, 2013 at 13:51
  • This is not much useful, how can I get the value from the output of the command? There are many values. And of course it's not platform independent.
    – Anna
    Commented Apr 18, 2013 at 9:14
0

The only solution I found is to use GLCanvas method IsDiplaySupported, however it seems that this method is available in wxPython 2.9 and not older versions.

1
  • This is exactly what I need (at least for wx >= 2.9). Thanks!
    – bogatron
    Commented Apr 18, 2013 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.