From 6c686562f03c14a51b32cb65111f0636abd5373b Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 22 Jul 2012 21:12:15 +0200 Subject: Fixed mixup of parameter types in OpenGL code Textures were not rendering correctly on cards that did not support the GL_ARB_texture_rectangle extension, since the alternative code path was passing ints as floats and floats as ints to OpenGL. Reviewed-by: Erik Schilling --- src/openglgraphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 74a309e1..6148b367 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -162,8 +162,8 @@ static inline void drawQuad(Image *image, dstX, dstY + height }; - glVertexPointer(2, GL_FLOAT, 0, &vert); - glTexCoordPointer(2, GL_INT, 0, &tex); + glVertexPointer(2, GL_INT, 0, &vert); + glTexCoordPointer(2, GL_FLOAT, 0, &tex); glDrawArrays(GL_QUADS, 0, 4); } @@ -224,8 +224,8 @@ static inline void drawRescaledQuad(Image *image, dstX, dstY + desiredHeight }; - glVertexPointer(2, GL_FLOAT, 0, &vert); - glTexCoordPointer(2, GL_INT, 0, &tex); + glVertexPointer(2, GL_INT, 0, &vert); + glTexCoordPointer(2, GL_FLOAT, 0, &tex); glDrawArrays(GL_QUADS, 0, 4); } -- cgit v1.2.3-60-g2f50