shader error handling rely on glGetObjectParameterivARB which is not in core profile
rndblnch <[email protected]> Tue, 18 Feb 2014 21:46:57 +0000 (UTC)
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net