pyopengl icon indicating copy to clipboard operation
pyopengl copied to clipboard

Undefined function gluOrtho2D

Open spaceraiders0 opened this issue 4 years ago • 1 comments

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?

spaceraiders0 avatar Dec 19 '20 10:12 spaceraiders0

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?

Schlumpf9 avatar May 21 '21 16:05 Schlumpf9