In pyopengl-ctypes CVS:
When trying to compile an erroneous shader pyopengl returns the following error:
File "/usr/lib/python2.5/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 85, in GLSLCheckError
description= glGetInfoLog( cArguments[0] )
NameError: global name 'glGetInfoLog' is not defined
After adding "from OpenGL.GL.ARB.shader_objects import glGetInfoLogARB as glGetInfoLog" to GL_2.0.py the following error appears:
File "/usr/lib/python2.5/site-packages/OpenGL/GL/ARB/shader_objects.py", line 120, in glGetInfoLogARB
log = ctypes.create_string_buffer(length)
File "/usr/lib/python2.5/ctypes/__init__.py", line 73, in create_string_buffer
raise TypeError, init
TypeError: 220
The preceding call to glGetObjectParameterivARB returns a "length" that is of type numpy.int32 while ctypes expects long or int.
After casting "length" to int, the program now throws the proper GLError.
Logged In: YES
user_id=34901
Originator: NO
Don't have a shader-capable system at the moment, I've integrated the changes into CVS, guess we'll see whether they work when I get to a shader-capable machine.
Shader info logs are working on shader capable machines.