I've just installed OpenGL to use with Python 3.7 and PyQt5, installation was without any errors. When I try to run the example codes given with PyQt5 for OpenGL, only 1 example code runs, all other gave error. Following are the error associated with each file:
openglwindow.py
self.m_gl.initializeOpenGLFunctions()
AttributeError: 'NoneType' object has no attribute 'initializeOpenGLFunctions'
grabber.py
File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glLightfv,
...
hellogl.py
File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGetString,
cArguments = (GL_VENDOR,)
)
overpainting.py
File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGenLists,
cArguments = (1,),
result = 0
)
samplebuffers.py
File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glMatrixMode,
cArguments = (GL_PROJECTION,)
)
I am using windows 10 and OpenGL version is 3.1. How can I fix this issue?