Commit 52c8e3a7 authored by sumpfralle's avatar sumpfralle

r656@erker: lars | 2010-02-14 17:15:58 +0100

 fix integer division for viewport


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@121 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent ece429e9
...@@ -260,7 +260,7 @@ class GLView: ...@@ -260,7 +260,7 @@ class GLView:
GL.glMatrixMode(GL.GL_PROJECTION) GL.glMatrixMode(GL.GL_PROJECTION)
GL.glLoadIdentity() GL.glLoadIdentity()
v = self.view v = self.view
GLU.gluPerspective(v["fovy"], self.area.allocation.width/self.area.allocation.height, v["znear"], v["zfar"]) GLU.gluPerspective(v["fovy"], (0.0 + self.area.allocation.width)/self.area.allocation.height, v["znear"], v["zfar"])
GLU.gluLookAt(v["center"][0] + v["distance"][0], v["center"][1] + v["distance"][1], v["center"][2] + v["distance"][2], GLU.gluLookAt(v["center"][0] + v["distance"][0], v["center"][1] + v["distance"][1], v["center"][2] + v["distance"][2],
v["center"][0], v["center"][1], v["center"][2], v["up"][0], v["up"][1], v["up"][2]) v["center"][0], v["center"][1], v["center"][2], v["up"][0], v["up"][1], v["up"][2])
GL.glMatrixMode(prev_mode) GL.glMatrixMode(prev_mode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment