如何解决pyopengl:未定义的函数gluPerspective,在调用前检查boolgluPerspective
我目前正在为Pygame中的toggle_fullscreen
-Function编写测试,因为由于即将发布的Pygame 2.0版本,我为toggle_fullscreen
是working together with others on the Pygame-Documentation。
我正在为Fedora-Linux编写测试(因为它使用Wayland)。带有“正常”窗口的第一个测试很容易,但是现在我遇到了“ OpenGL”变体的麻烦。
我对OpenGL不太熟悉,因此我使用了发现的示例代码,然后想要对其进行修改以满足我的需要。当我尝试运行发现的here代码时,出现以下错误:
OpenGL.error.NullFunctionError: Attempt to call an undefined function gluPerspective,check for bool(gluPerspective) before calling
由于我不在Windows上,因此无法使用unofficial Windows-Binaries。其次,我无法按照建议的here添加可能必要的dll(仍然是因为它不是Windows)。
我也尝试了pygame.example.glcube
,但没有帮助,同样的错误。在Windows上,我没有使用相同代码的问题。
Fedora 32:
- Python 3.8.5,Pygame 1.9.6,pyopengl 3.1.5
Windows 10:
- Python 3.8.1,Pygame 1.9.6,pyopengl 3.1.5
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。