aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xexamples/opengl/hellogl.py2
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()