Commit 78855cf9 authored by Sam Lantinga's avatar Sam Lantinga

Adjust the vertices to be over the texel center.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404195
parent ffed1353
...@@ -422,9 +422,9 @@ SDL_PROC_UNUSED(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z)) ...@@ -422,9 +422,9 @@ SDL_PROC_UNUSED(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z))
SDL_PROC_UNUSED(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z)) SDL_PROC_UNUSED(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z))
SDL_PROC_UNUSED(void, glVertex2d, (GLdouble x, GLdouble y)) SDL_PROC_UNUSED(void, glVertex2d, (GLdouble x, GLdouble y))
SDL_PROC_UNUSED(void, glVertex2dv, (const GLdouble * v)) SDL_PROC_UNUSED(void, glVertex2dv, (const GLdouble * v))
SDL_PROC_UNUSED(void, glVertex2f, (GLfloat x, GLfloat y)) SDL_PROC(void, glVertex2f, (GLfloat x, GLfloat y))
SDL_PROC_UNUSED(void, glVertex2fv, (const GLfloat * v)) SDL_PROC_UNUSED(void, glVertex2fv, (const GLfloat * v))
SDL_PROC(void, glVertex2i, (GLint x, GLint y)) SDL_PROC_UNUSED(void, glVertex2i, (GLint x, GLint y))
SDL_PROC_UNUSED(void, glVertex2iv, (const GLint * v)) SDL_PROC_UNUSED(void, glVertex2iv, (const GLint * v))
SDL_PROC_UNUSED(void, glVertex2s, (GLshort x, GLshort y)) SDL_PROC_UNUSED(void, glVertex2s, (GLshort x, GLshort y))
SDL_PROC_UNUSED(void, glVertex2sv, (const GLshort * v)) SDL_PROC_UNUSED(void, glVertex2sv, (const GLshort * v))
......
...@@ -1105,7 +1105,7 @@ GL_RenderPoint(SDL_Renderer * renderer, int x, int y) ...@@ -1105,7 +1105,7 @@ GL_RenderPoint(SDL_Renderer * renderer, int x, int y)
(GLfloat) renderer->a * inv255f); (GLfloat) renderer->a * inv255f);
data->glBegin(GL_POINTS); data->glBegin(GL_POINTS);
data->glVertex2i(x, y); data->glVertex2f(0.5f + x, 0.5f + y);
data->glEnd(); data->glEnd();
return 0; return 0;
...@@ -1124,8 +1124,8 @@ GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) ...@@ -1124,8 +1124,8 @@ GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
(GLfloat) renderer->a * inv255f); (GLfloat) renderer->a * inv255f);
data->glBegin(GL_LINES); data->glBegin(GL_LINES);
data->glVertex2i(x1, y1); data->glVertex2f(0.5f + x1, 0.5f + y1);
data->glVertex2i(x2, y2); data->glVertex2f(0.5f + x2, 0.5f + y2);
data->glEnd(); data->glEnd();
return 0; return 0;
...@@ -1234,13 +1234,13 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -1234,13 +1234,13 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
data->glBegin(GL_TRIANGLE_STRIP); data->glBegin(GL_TRIANGLE_STRIP);
data->glTexCoord2f(minu, minv); data->glTexCoord2f(minu, minv);
data->glVertex2i(minx, miny); data->glVertex2f(0.5f + minx, 0.5f + miny);
data->glTexCoord2f(maxu, minv); data->glTexCoord2f(maxu, minv);
data->glVertex2i(maxx, miny); data->glVertex2f(0.5f + maxx, 0.5f + miny);
data->glTexCoord2f(minu, maxv); data->glTexCoord2f(minu, maxv);
data->glVertex2i(minx, maxy); data->glVertex2f(0.5f + minx, 0.5f + maxy);
data->glTexCoord2f(maxu, maxv); data->glTexCoord2f(maxu, maxv);
data->glVertex2i(maxx, maxy); data->glVertex2f(0.5f + maxx, 0.5f + maxy);
data->glEnd(); data->glEnd();
if (texturedata->shader != 0) { if (texturedata->shader != 0) {
......
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