OPENGL: Store logical texture dimensions in GLTexture.

This commit is contained in:
Johannes Schickel 2016-03-04 15:32:14 +01:00
parent 2b3340474e
commit 1e1272a8c4
2 changed files with 23 additions and 1 deletions

View file

@ -99,9 +99,26 @@ public:
*/
void updateArea(const Common::Rect &area, const Graphics::Surface &src);
/**
* Query the GL texture's width.
*/
uint getWidth() const { return _width; }
/**
* Query the GL texture's height.
*/
uint getHeight() const { return _height; }
/**
* Query the logical texture's width.
*/
uint getLogicalWidth() const { return _logicalWidth; }
/**
* Query the logical texture's height.
*/
uint getLogicalHeight() const { return _logicalHeight; }
/**
* Obtain texture coordinates for rectangular drawing.
*/
@ -120,6 +137,7 @@ private:
const GLenum _glType;
uint _width, _height;
uint _logicalWidth, _logicalHeight;
GLfloat _texCoords[4*2];
GLint _glFilter;