bug in upstream version of pyopengl

rndblnch <[email protected]> Mon, 10 Mar 2014 18:38:51 +0000 (UTC)
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
hello mike,

i just tested the bleeding edge of pyopengl (rev 740) and found a bug in the
error handling code:
the OpenGL.error._ErrorChecker.nullGetError method (used when error checking
is enabled but not the accelerate module between glBegin/glEnd pairs)
returns None; but the result of self._currentChecker() is tested against
self._noErrorResult which is 0.
so with no accelerate and error checking, glBegin always raises and exception.

the following patch is a way to fix the issue:

=== modified file 'OpenGL/error.py'
--- OpenGL/error.py	2014-02-24 16:15:39 +0000
+++ OpenGL/error.py	2014-03-10 18:30:25 +0000
@@ -223,7 +223,7 @@
                     should call onBegin and onEnd appropriately.
                 """
                 err = self._currentChecker()
-                if err != self._noErrorResult:
+                if err and err != self._noErrorResult:
                     raise GLError(
                         err,
                         result,


renaud


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net