我有这个问题:

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from OpenGL.GL import *
>>> glGenTextures
<OpenGL.lazywrapper.glGenTextures object at 0x9d3b18c>
>>> glGenTextures(1)
Segmentation fault


我在Ubuntu 10.04 LTS上

会是什么在哪里可以找到其他信息?

最佳答案

您应该在调用任何OpenGL函数之前使上下文处于活动状态。另外,glGenTextures需要两个参数,因此pyopengl不会直接调用它。您必须查看pyopengl源代码才能确切了解出了什么问题,但是首先创建上下文肯定是解决方案的一部分。

关于python - glGenTextures中的pyopengl错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5445304/

10-12 20:20