How can I determine the max allowable WX_GL_DEPTH_SIZE for a wx GLCanvas?

ぃ、小莉子 提交于 2019-12-11 10:09:46

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/14715739/how-can-i-determine-the-max-allowable-wx-gl-depth-size-for-a-wx-glcanvas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!