diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-22 21:12:15 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-23 08:21:40 +0200 |
commit | 3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e (patch) | |
tree | f4b02c8e9e9ca2702d65244d81eaf0f8c2f49dd7 /src | |
parent | 719ae10eca9083058dd5734ffc7aaa51c5fc9f98 (diff) | |
download | mana-3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e.tar.gz mana-3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e.tar.bz2 mana-3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e.tar.xz mana-3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/openglgraphics.cpp | 8 |
1 files 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); } |