Broken GLCanvas

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken GLCanvas

peter.west
Hi

We have an application that has recently stopped working after upgrading to 64 bit Windows 7 and WXPython 3.0. It throws OpenGL error like this

    glMatrixMode(GL_PROJECTION)
  File "GL_accelerate\src\errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src\errorchecker.c:1168)
OpenGL.error.GLError: GLError(
err = 1282,
description = 'invalid operation',
baseOperation = glMatrixMode,
cArguments = (GL_PROJECTION,)

After a lot of poking around the problem appears to be with wx.glcanvas.  To test this hypothesis we downloaded the example code from here
http://xoomer.virgilio.it/infinity77/wxPython/glcanvas/wx.glcanvas.html

This also suffers from the same problem, any call to to Pyopengl, even to GLGetString results in a similar 'invalid operation' error.  The sample code works on a colleagues 32 bit Windows 7 machine with WXPyton 2.8 and as far as we can tell PyOpenGL is fully working using the PyOpenGL Demo package on the 64 bit machine.  

Any help would be much appreciated.

  

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Broken GLCanvas

bradcan
Hi Peter,

At what point, before or after your wx.GLCanvas is painted?

There are some platform subleties which produce these symptoms. Basically the canvas must be shown (ie. after OnPaint event) and the gl context must be set,  but it cannot be until after OnPaint.  These are required before any PyOpenGL calls.

Example code from the web is mostly tested on a single platform and nobody says which. Python wx and opengl are built atop some deep dark platform dependent libraries.

Perseverance is essential.


On Thursday, February 26, 2015 at 2:52:21 AM UTC, [hidden email] wrote:
Hi

We have an application that has recently stopped working after upgrading to 64 bit Windows 7 and WXPython 3.0. It throws OpenGL error like this

    glMatrixMode(GL_PROJECTION)
  File "GL_accelerate\src\errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src\errorchecker.c:1168)
OpenGL.error.GLError: GLError(
err = 1282,
description = 'invalid operation',
baseOperation = glMatrixMode,
cArguments = (GL_PROJECTION,)

After a lot of poking around the problem appears to be with wx.glcanvas.  To test this hypothesis we downloaded the example code from here
<a href="http://xoomer.virgilio.it/infinity77/wxPython/glcanvas/wx.glcanvas.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fxoomer.virgilio.it%2Finfinity77%2FwxPython%2Fglcanvas%2Fwx.glcanvas.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF10vh1jfEHmwhC8PjSWapnDMm5nw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fxoomer.virgilio.it%2Finfinity77%2FwxPython%2Fglcanvas%2Fwx.glcanvas.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF10vh1jfEHmwhC8PjSWapnDMm5nw&#39;;return true;">http://xoomer.virgilio.it/infinity77/wxPython/glcanvas/wx.glcanvas.html

This also suffers from the same problem, any call to to Pyopengl, even to GLGetString results in a similar 'invalid operation' error.  The sample code works on a colleagues 32 bit Windows 7 machine with WXPyton 2.8 and as far as we can tell PyOpenGL is fully working using the PyOpenGL Demo package on the 64 bit machine.  

Any help would be much appreciated.

  

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.