From 3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e 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. --- src/openglgraphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index ac412334..69b4b960 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -175,8 +175,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); } @@ -237,8 +237,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-70-g09d2