mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
318 stars 101 forks source link

freeglut errors #76

Open GentleHedgehog opened 2 years ago

GentleHedgehog commented 2 years ago

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