使用 pygtkglext 的着色器

发布于 2024-08-14 17:16:11 字数 579 浏览 3 评论 0原文

有人知道如何让 glsl 着色器在 gtk-opengl 窗口中工作吗?使用 glut 所有 glCreateProgram 等函数都可以工作,但是当我尝试将相同的 gl 代码放入 pygtkglext 窗口时,它抱怨 NullReference:

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

所以然后我 from OpenGL.GL.ARB.shader_objects import *,但结果是相似的:

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

任何想法都会有用。

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 call an undefined function glCreateProgramObjectARB, check for bool(glCreateProgramObjectARB) before calling

Any idea will be useful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别在捏我脸啦 2024-08-21 17:16:11

答案是尚不支持。只是 pygtkglext 没有设置 glCreateProgram。然而 git 版本却可以。

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

〆凄凉。 2024-08-21 17:16:11

OpenGL 入口点是使用 GetProcAddress 例程获得的。我认为 NULL 指针是函数指针 glCreateProgramObjectARB。

这与驱动程序安装的库密切相关。主机上运行的是哪个 OpenGL 版本?也许驱动程序没有实现 glCreateProgramObjectARB。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文