From 2b9bbfca55a6582d715cda78cbfd4f46338cec7c Mon Sep 17 00:00:00 2001 From: Lazik Date: Fri, 16 Aug 2013 18:27:24 -0400 Subject: 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: : wrong type --- examples/opengl/hellogl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/opengl') 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() -- cgit v1.2.3