开发者

Shaders with pygtkglext

Do someone know how to get glsl shaders work in gtk-opengl window? With glut all glCreateProgram etc. functions works, but when I tried to put the same gl code into pygtkglext window, its complaining about NullReference:

OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateProgram, check for bool(glCreateProgram) before calling

So then I from OpenGL.GL.ARB.shader_objects import *, but the result is similar:

OpenGL.error.NullFunctionError: Attempt to ca开发者_高级运维ll an undefined function glCreateProgramObjectARB, check for bool(glCreateProgramObjectARB) before calling

Any idea will be useful.


The answer is its not supported yet. Simply pygtkglext doesn't set glCreateProgram. However git version does.


OpenGL entry points are obtained using GetProcAddress routine. I suppose the NULL pointer is the function pointer glCreateProgramObjectARB.

This is strictly related with libraries installed with the driver. Which OpenGL version is running on the host? Maybe the driver doesn't implements the glCreateProgramObjectARB.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜