diff src/video/SDL_renderer_gl.c @ 3264:8fe0806637df

Fixed bug #783 Fixed coordinate positioning with OpenGL renderer, and added a test case
author Sam Lantinga <slouken@libsdl.org>
date Sat, 19 Sep 2009 05:12:26 +0000
parents e3d33bd599eb
children 1ed5d432e468
line wrap: on
line diff
--- a/src/video/SDL_renderer_gl.c	Sat Sep 19 04:47:36 2009 +0000
+++ b/src/video/SDL_renderer_gl.c	Sat Sep 19 05:12:26 2009 +0000
@@ -450,8 +450,8 @@
         data->glMatrixMode(GL_MODELVIEW);
         data->glLoadIdentity();
         data->glViewport(0, 0, window->w, window->h);
-        data->glOrtho(0.0, (GLdouble) window->w, (GLdouble) window->h, 0.0,
-                      0.0, 1.0);
+        data->glOrtho(-0.5, (GLdouble) window->w-0.5,
+                      (GLdouble) window->h-0.5, -0.5, 0.0, 1.0);
         data->updateSize = SDL_FALSE;
     }
     return 0;