Re: [PyOpenGL-Users] settingOpenGL.ERROR_CHECKING to False has strange consequence on function loadi
Brought to you by:
mcfletch
|
From: rndblnch <rnd...@gm...> - 2014-02-21 15:14:46
|
rndblnch <rndblnch <at> gmail.com> writes: > what i do not understand however, is how the error checking interact with > those import (i.e. why setting error checking makes the ARB import find a > valid glGenVertexArrays function and why it becomes invalid when error > checking is disabled). ok, i think i have made progress in my understanding of the problem. regarding extension loading, there is one place where the OpenGL.ERROR_CHECKING flag changes the code path taken, it is in OpenGL/extensions.py, line 163: the glGetString call will fail silently on OpenGL 3+ if error checking is not enabled, while it will raise an exception if error checking is enabled. in this later case, the alternate code path provided in the except clause will correctly fetch the extensions. maybe a fix would be to explicitly check for error after the glGetString call? renaud |