pyopengl

Why the quads do not render?

Why the quads do not render? Question: Im using PyOpenGL with PyQt5 widgets. In my OpenGL widget I have the following code: class Renderizador(QOpenGLWidget): def __init__(self, parent=None): super().__init__(parent) self._x = -0.1 self._y = -0.1 self._z = -0.1 self._rx = 45 self._ry = 45 self._rz = -45 self.vertices_vertical = [[100, 100, 0], [100, -100, 0], [-100, …

Total answers: 1

Change perspective of a PyOpenGL widget

Change perspective of a PyOpenGL widget Question: I am trying to change the perspective of my scene in a PyQt5 OpenGL widget. I know I have to override some methods, but I do not know which one should I use. def initializeGL(self): glClear(GL_COLOR_BUFFER_BIT) glEnable(GL_DEPTH_TEST) def paintGL(self): glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glBegin(GL_LINES) # More code Where should …

Total answers: 1

PyOpenGL transforming view coordinates into object coordinates for ArcBall navigation

PyOpenGL transforming view coordinates into object coordinates for ArcBall navigation Question: I am following this tutorial for arcball navigation in 3d: https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Arcball I managed to perform all the steps and the navigation works but I cant seem to comprehend last step in tutorial: An extra trick is converting the rotation axis from camera coordinates to …

Total answers: 1

Attempt to call an undefined function glutInit

Attempt to call an undefined function glutInit Question: I need a glut window in python. I have the following exception using Python 3.5 and PyOpenGL.GLUT Traceback (most recent call last): File “D:…Test.py”, line 47, in <module> if __name__ == ‘__main__’: main() File “D:…Test.py”, line 9, in main glutInit(sys.argv) File “C:…OpenGLGLUTspecial.py”, line 333, in glutInit _base_glutInit( …

Total answers: 3

"filename.whl is not a supported wheel on this platform"

"filename.whl is not a supported wheel on this platform" Question: I saw the same question, but it didn’t work for me. pip install PyOpenGL.3.1.1-cp34-cp34m-win_amd64.whl I also have the same problem for NumPy: pip install numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whl Then I get: numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whl is not a supported wheel on this platform. Storing debug log for failure in C://Users/myUsername/pip/pip.log I’m …

Total answers: 8

Change color of figures with PyOpenGL

Change color of figures with PyOpenGL Question: I have to do a basic program in Python using the library Opengl…when somebody press the key ‘r’, the figure change to red, when somebody pressed key ‘g’ change green and when somebody pressed ‘b’ change blue. I don’t know why the color doesn’t change, but i know …

Total answers: 2

Python – No handlers could be found for logger "OpenGL.error"

Python – No handlers could be found for logger "OpenGL.error" Question: Okay, what is it, and why does it occur on Win2003 server, but not on WinXP. It doesn’t seem to affect my application at all, but I get this error message when I close the application. And it’s annoying (as errors messages should be). …

Total answers: 3