diff options
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/opengl/texture.cpp | 14 | ||||
-rw-r--r-- | backends/graphics/opengl/texture.h | 2 |
2 files changed, 8 insertions, 8 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)); diff --git a/backends/graphics/opengl/texture.h b/backends/graphics/opengl/texture.h index e28d980de4..ad70833544 100644 --- a/backends/graphics/opengl/texture.h +++ b/backends/graphics/opengl/texture.h @@ -79,7 +79,7 @@ public: void fill(uint32 color); - void draw(GLuint x, GLuint y, GLuint w, GLuint h); + void draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h); void flagDirty() { _allDirty = true; } bool isDirty() const { return _allDirty || !_dirtyArea.isEmpty(); } |