[PyOpenGL-Users] shader error handling rely on glGetObjectParameterivARB which is not in core profi
Brought to you by:
mcfletch
From: rndblnch <rnd...@gm...> - 2014-02-18 21:47:33
|
hello again, last report for tonight... i am still testing core profile, and yet another corner case: OpenGL.GL.shaders.glCompileShader is imported from ARB.shader_objects extension and its error handling relies on glGetObjectParameterivARB .. which is not present in core profile. this leads to trouble when trying to report compilation errors: % python3 10-gl3.2core.py Traceback (most recent call last): [...] File "10-gl3.2core.py", line 37, in create_shader glCompileShader(shader) File "OpenGL/platform/baseplatform.py", line 32, in __call__ return self.func( *args, **named ) File "OpenGL/GL/VERSION/GL_2_0.py", line 145, in GLSLCheckError description= glGetInfoLog( cArguments[0] ) File "latebind.pyx", line 44, in OpenGL_accelerate.latebind.Curry.__call__ (src/latebind.c:1189) File "OpenGL/GL/ARB/shader_objects.py", line 134, in glGetInfoLogARB length = int(glGetObjectParameterivARB(obj, GL_INFO_LOG_LENGTH_ARB)) File "latebind.pyx", line 44, in OpenGL_accelerate.latebind.Curry.__call__ (src/latebind.c:1189) File "OpenGL/GL/ARB/shader_objects.py", line 86, in glGetObjectParameterivARB shader, pname, status File "OpenGL/platform/baseplatform.py", line 390, in __call__ self.__name__, self.__name__, OpenGL.error.NullFunctionError: Attempt to call an undefined function glGetObjectParameterivARB, check for bool(glGetObjectParameterivARB) before calling i guess it should be replaced by OpenGL.GL.shaders.glGetProgramiv/glGetShaderiv but i don't see how to do that without creating a circular dependency... i stop bothering you for today, renaud |