我在 Ubuntu Natty 上使用 PyOpenGL 3。
我想使用 glDrawElementsBaseVertex
功能。
我可以看到它列在我的 glxinfo 输出中,所以我知道我的卡上有它。
但是,我找不到如何实际调用它。当我导入 OpenGL.GL
时,如果我尝试使用它,我会收到 NameError
。 (与None
不同)。
最佳答案
尝试通过其扩展名导入该函数:
>>> from OpenGL.GL.ARB.draw_elements_base_vertex import *
>>> glDrawElementsBaseVertex
<OpenGL.platform.baseplatform.glDrawElementsBaseVertex object at 0x031D7B30>
关于python - 从 Python 调用 OpenGL 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6423994/