pyopengl
pyopengl copied to clipboard
freeglut errors
Hello.
My OS - Windows 10 x64. MSVC build tools - Visual Studio 2019 version 16.11.10. Python 3.9 x64.
I installed this library by pip. Then I tried to import OpenGL.GLUT and call to glutInit(), but I got the error - undefined reference. I downloaded freeglut (MSVC version), added a path to the dll to the system path. But I got the same error.
Then I looked at the code. I found that pyopengl requires the special name for glut: "freeglut64.vc14.dll" (for my case). I dont understand. Why?
I changed the name of dll and glutInit() call had success. But then I got the following error:
Traceback (most recent call last): File "d:\Python\Projects\OpenGL\opengl_hello_world.py", line 15, in <module> wind = glutCreateWindow("OpenGL Coding Practice") # Give your window a title File "C:\Users\ejok8\anaconda3\envs\opengl_venv\lib\site-packages\OpenGL\GLUT\special.py", line 73, in glutCreateWindow return __glutCreateWindowWithExit(title, _exitfunc) ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type