diff options
author | Lazik <qc.loic@gmail.com> | 2013-08-16 18:27:24 -0400 |
---|---|---|
committer | Lazik <qc.loic@gmail.com> | 2013-08-16 18:27:24 -0400 |
commit | 2b9bbfca55a6582d715cda78cbfd4f46338cec7c (patch) | |
tree | 13c49697184e037dc41f3697e1969141913b68f6 /examples/opengl | |
parent | 00cc5dbe662db3401259c6b700e623e58866d063 (diff) |
Update hellogl.py
Fixed type for python 3.x
Traceback (most recent call last):
File "gltemp.py", line 129, in resizeGL
GL.glViewport((width - side) / 2, (height - side) / 2, side, side)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
Diffstat (limited to 'examples/opengl')
-rwxr-xr-x | examples/opengl/hellogl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opengl/hellogl.py b/examples/opengl/hellogl.py index 3bb7d49..f812e3f 100755 --- a/examples/opengl/hellogl.py +++ b/examples/opengl/hellogl.py @@ -126,7 +126,7 @@ class GLWidget(QtOpenGL.QGLWidget): def resizeGL(self, width, height): side = min(width, height) - GL.glViewport((width - side) / 2, (height - side) / 2, side, side) + GL.glViewport(int((width - side) / 2),int((height - side) / 2), side, side) GL.glMatrixMode(GL.GL_PROJECTION) GL.glLoadIdentity() |