mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
320 stars 102 forks source link

Undefined function gluOrtho2D #59

Open spaceraiders0 opened 3 years ago

spaceraiders0 commented 3 years ago

It seems I'm unable to use the function gluOrtho2D from the GLU package.

Traceback (most recent call last):
  File "/home/spaceraiders/programming/opengl/./rendering.py", line 95, in <module>
    my_renderer = Renderer(SCREEN_SIZE)
  File "/home/spaceraiders/programming/opengl/./rendering.py", line 31, in __init__
    self.opengl_bind()
  File "/home/spaceraiders/programming/opengl/./rendering.py", line 41, in opengl_bind
    GLU.gluOrtho2D(0, self.screen_size[0], 0, self.screen_size[1])
  File "/home/spaceraiders/.local/lib/python3.9/site-packages/OpenGL/platform/baseplatform.py", line 423, in __call__
    raise error.NullFunctionError(
OpenGL.error.NullFunctionError: Attempt to call an undefined function gluOrtho2D, check for bool(gluOrtho2D) before calling

This doesn't quite make sense to me, because the function is being autocompleted. I'm using Python3.9, running the latest version of Arch Linux. I've also installed both PyOpenGL, along with PyOpenGL_accelerate using pip3. Is this an issue with me using Python3.9, Arch, or what?

Schlumpf9 commented 3 years ago

I've got the same issue on centOS 7.9, Windows is working fine... I've also installed yum install python-opengl. Does anyone has a solution?