22 #ifndef GRAPHICS_OPENGL_TEXTURE_H 23 #define GRAPHICS_OPENGL_TEXTURE_H 25 #include "graphics/opengl/system_headers.h" 26 #include "graphics/opengl/context.h" 28 #include "graphics/pixelformat.h" 29 #include "graphics/surface.h" 31 #include "common/rect.h" 32 #include "common/rotationmode.h" 40 kWrapModeMirroredRepeat
57 Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType,
bool autoCreate =
true);
106 bool setSize(uint width, uint height);
113 void setFlip(
bool flip) {
if (_flip != flip) { _flip = flip; computeTexCoords(); } }
178 void computeTexCoords();
180 const GLenum _glIntFormat;
181 const GLenum _glFormat;
182 const GLenum _glType;
184 uint _width, _height;
185 uint _logicalWidth, _logicalHeight;
189 GLfloat _texCoords[4*2];
bool setSize(uint width, uint height)
void setRotation(Common::RotationMode rotation)
Definition: texture.h:120
void setWrapMode(WrapMode wrapMode)
void enableLinearFiltering(bool enable)
void setFlip(bool flip)
Definition: texture.h:113
uint getHeight() const
Definition: texture.h:140
void updateArea(const Common::Rect &area, const Graphics::Surface &src)
GLuint getGLTexture() const
Definition: texture.h:163
uint getLogicalWidth() const
Definition: texture.h:145
uint getWidth() const
Definition: texture.h:135
Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType, bool autoCreate=true)
Definition: renderbuffer.h:27
const GLfloat * getTexCoords() const
Definition: texture.h:155
uint getLogicalHeight() const
Definition: texture.h:150
RotationMode
Definition: rotationmode.h:44
bool isLinearFilteringEnabled() const
Definition: texture.h:70