summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-22 21:12:15 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-23 08:21:40 +0200
commit3cd1fd8e0b11793d082c7f7ca4c9ddafd434971e (patch)
treef4b02c8e9e9ca2702d65244d81eaf0f8c2f49dd7
parent719ae10eca9083058dd5734ffc7aaa51c5fc9f98 (diff)
downloadmana-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.
-rw-r--r--src/openglgraphics.cpp8
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);
}