glBindTexture raises OverflowError in 2.0.1.09
Brought to you by:
mcfletch
I'm running the Debian python-opengl package that shows as version 2.0.1.09.
Code:
self._texture = glGenTextures(1)
glBindTexture(GL_TEXTURE_2D, self._texture)
raises
glBindTexture(GL_TEXTURE_2D, self._texture)
OverflowError: long int too large to convert to int
I saw some mailing list post claiming the bug was fixed in the .07 version, looks like someone reintroduced it again.
Logged In: NO
confirmed on =dev-python/pyopengl-2.0.1.09-r1 on gentoo
Logged In: YES
user_id=135353
Originator: NO
This happened to me. The problem appeared to be that I was calling glGenTextures() before the program had called glCreateWindow(). Calling glGenTextures() after glCreateWindow() fixed it. A proper fix, however, would be to make glGenTextures() raise a more meaningful exception if it's called at the wrong time. Even better, fix glGenTextures() so that it can be called any time.