[PyOpenGL-Users] bug in upstream version of pyopengl
Brought to you by:
mcfletch
|
From: rndblnch <rnd...@gm...> - 2014-03-10 18:39:27
|
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
|