刚开是接触pyopenggl,用的是Mac。但是运行示例程序的时候一直报错。
Traceback (most recent call last):
File "/Users/wupeihan/Project/learning/python/opengl/traingle.py", line 25, in <module>
glutInit()
File "/Users/wupeihan/miniconda3/envs/opengl/lib/python3.7/site-packages/OpenGL/GLUT/special.py", line 333, in glutInit
_base_glutInit( ctypes.byref(count), holder )
File "/Users/wupeihan/miniconda3/envs/opengl/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 425, in __call__
self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling
目前能找到的解决方案都是windows系统的,不知道Mac上应该怎么解决。
相似问题