gpt4 book ai didi

python - glGenTextures 中的 pyopengl 错误

转载 作者:行者123 更新时间:2023-11-30 23:53:50 25 4
gpt4 key购买 nike

我有这个问题:

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com