Fixed the coordinates for pixel coverage in blits
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Nov 2009 06:34:43 +0000
changeset 3472 fdd2f2e9cd97
parent 3471 da53c4046c65
child 3473 7bdc10624cba
Fixed the coordinates for pixel coverage in blits
src/video/SDL_renderer_gl.c
--- a/src/video/SDL_renderer_gl.c	Sat Nov 21 06:28:25 2009 +0000
+++ b/src/video/SDL_renderer_gl.c	Sat Nov 21 06:34:43 2009 +0000
@@ -1292,13 +1292,13 @@
 
     data->glBegin(GL_TRIANGLE_STRIP);
     data->glTexCoord2f(minu, minv);
-    data->glVertex2f(0.5f + minx, 0.5f + miny);
+    data->glVertex2f((GLfloat) minx, (GLfloat) miny);
     data->glTexCoord2f(maxu, minv);
-    data->glVertex2f(0.5f + maxx, 0.5f + miny);
+    data->glVertex2f((GLfloat) maxx, (GLfloat) miny);
     data->glTexCoord2f(minu, maxv);
-    data->glVertex2f(0.5f + minx, 0.5f + maxy);
+    data->glVertex2f((GLfloat) minx, (GLfloat) maxy);
     data->glTexCoord2f(maxu, maxv);
-    data->glVertex2f(0.5f + maxx, 0.5f + maxy);
+    data->glVertex2f((GLfloat) maxx, (GLfloat) maxy);
     data->glEnd();
 
     if (shader) {