我只是想运行这个示例代码来测试安装:https://gist.github.com/ousttrue/c4ae334fc1505cdf4cd7
尽管我已经使用此处的 whl 文件安装了 PyOpenGL、PyOpenGL-accelerate 和 freeglut,但 glCreateProgram() 仍失败:https://www.lfd.uci.edu/~gohlke/pythonlibs/
错误:
File "C:\Program Files (x86)\Python\Python35\lib\site-
packages\OpenGL\platform\baseplatform.py", line 410, in __call__
self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function
glCreateProgram, check for bool(glCreateProgram) before calling
本教程中不包含着色器的代码工作得很好:https://noobtuts.com/python/opengl-introduction 所以只是 glCreateProgram() 失败了。
我还将 DLL 文件复制到 SystenWOW64 和 System32 以及我的脚本运行所在的文件夹中。
有谁知道在哪里搜索错误。
我通过远程桌面运行 Windows 10 64 位和 64 位 Python 3.5
最佳答案
问题是,当您登录远程桌面时,您无法访问显卡。将屏幕直接连接到计算机解决了问题。
关于python - PyOpenGL:glCreateProgram() 导致 NullFunctionError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51480426/