map screen to pixels 1:1

This commit is contained in:
Josh Holtrop 2011-04-23 17:18:34 -04:00
parent 5f02703ecd
commit 0401d89bb4

View File

@ -84,7 +84,7 @@ class SketchWidget:
glViewport(0, 0, width, height)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, width, 0, height, 1.0, -1.0)
glOrtho(0, width - 1, 0, height - 1, 1.0, -1.0)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()