aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/opengl/texture.cpp')
-rw-r--r--backends/graphics/opengl/texture.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp
index dff483dc0d..7b0b22d630 100644
--- a/backends/graphics/opengl/texture.cpp
+++ b/backends/graphics/opengl/texture.cpp
@@ -166,7 +166,7 @@ void Texture::fill(uint32 color) {
flagDirty();
}
-void Texture::draw(GLuint x, GLuint y, GLuint w, GLuint h) {
+void Texture::draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h) {
// Only do any processing when the Texture is initialized.
if (!_textureData.getPixels()) {
return;
@@ -190,13 +190,13 @@ void Texture::draw(GLuint x, GLuint y, GLuint w, GLuint h) {
GLCALL(glTexCoordPointer(2, GL_FLOAT, 0, texcoords));
// Calculate the screen rect where the texture will be drawn.
- const GLshort vertices[4*2] = {
- (GLshort)x, (GLshort)y,
- (GLshort)(x + w), (GLshort)y,
- (GLshort)x, (GLshort)(y + h),
- (GLshort)(x + w), (GLshort)(y + h)
+ const GLfloat vertices[4*2] = {
+ x, y,
+ x + w, y,
+ x, y + h,
+ x + w, y + h
};
- GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices));
+ GLCALL(glVertexPointer(2, GL_FLOAT, 0, vertices));
// Draw the texture to the screen buffer.
GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));