diff options
Diffstat (limited to 'backends/graphics/opengl/texture.cpp')
-rw-r--r-- | backends/graphics/opengl/texture.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp index 79e3acc7c0..5252b5a32d 100644 --- a/backends/graphics/opengl/texture.cpp +++ b/backends/graphics/opengl/texture.cpp @@ -46,7 +46,8 @@ static GLuint nextHigher2(GLuint v) { GLTexture::GLTexture(GLenum glIntFormat, GLenum glFormat, GLenum glType) : _glIntFormat(glIntFormat), _glFormat(glFormat), _glType(glType), - _width(0), _height(0), _texCoords(), _glFilter(GL_NEAREST), + _width(0), _height(0), _logicalWidth(0), _logicalHeight(0), + _texCoords(), _glFilter(GL_NEAREST), _glTexture(0) { create(); } @@ -112,6 +113,9 @@ void GLTexture::setSize(uint width, uint height) { _height = height; } + _logicalWidth = width; + _logicalHeight = height; + // If a size is specified, allocate memory for it. if (width != 0 && height != 0) { const GLfloat texWidth = (GLfloat)width / _width; |