summaryrefslogtreecommitdiff
path: root/src
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-08-05 17:12:41 +0200
commit6c686562f03c14a51b32cb65111f0636abd5373b (patch)
tree44f4389ba9317924d109cc02fe39bed527cbf199 /src
parent56af29fad5467dd0a4eac95fac322d4ecdaec6d6 (diff)
downloadmana-6c686562f03c14a51b32cb65111f0636abd5373b.tar.gz
mana-6c686562f03c14a51b32cb65111f0636abd5373b.tar.bz2
mana-6c686562f03c14a51b32cb65111f0636abd5373b.tar.xz
mana-6c686562f03c14a51b32cb65111f0636abd5373b.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. Reviewed-by: Erik Schilling
Diffstat (limited to 'src')
-rw-r--r--src/openglgraphics.cpp8
1 files 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);
}