#include <texture.h>
Public Member Functions | |
Texture (GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format) | |
void | destroy () override |
void | recreate () override |
void | enableLinearFiltering (bool enable) override |
void | allocate (uint width, uint height) override |
uint | getWidth () const override |
uint | getHeight () const override |
Graphics::PixelFormat | getFormat () const override |
Graphics::Surface * | getSurface () override |
const Graphics::Surface * | getSurface () const override |
void | updateGLTexture () override |
const GLTexture & | getGLTexture () const override |
Public Member Functions inherited from OpenGL::Surface | |
virtual void | setMask (const byte *mask) |
void | copyRectToTexture (uint x, uint y, uint w, uint h, const void *src, uint srcPitch) |
void | fill (uint32 color) |
void | fill (const Common::Rect &r, uint32 color) |
void | flagDirty () |
virtual bool | isDirty () const |
virtual bool | hasPalette () const |
virtual void | setColorKey (uint colorKey) |
virtual void | setPalette (uint start, uint colors, const byte *palData) |
virtual void | setScaler (uint scalerIndex, int scaleFactor) |
Protected Member Functions | |
void | updateGLTexture (Common::Rect &dirtyArea) |
Protected Member Functions inherited from OpenGL::Surface | |
void | clearDirty () |
void | addDirtyArea (const Common::Rect &r) |
Common::Rect | getDirtyArea () const |
Protected Attributes | |
const Graphics::PixelFormat | _format |
An OpenGL texture wrapper. It automatically takes care of all OpenGL texture handling issues and also provides access to the texture data.
OpenGL::Texture::Texture | ( | GLenum | glIntFormat, |
GLenum | glFormat, | ||
GLenum | glType, | ||
const Graphics::PixelFormat & | format | ||
) |
Create a new texture with the specific internal format.
glIntFormat | The internal format to use. |
glFormat | The input format. |
glType | The input type. |
format | The format used for the texture input. |
|
overridevirtual |
Destroy OpenGL description of surface.
Implements OpenGL::Surface.
|
overridevirtual |
Recreate OpenGL description of surface.
Implements OpenGL::Surface.
|
overridevirtual |
Enable or disable linear texture filtering.
enable | true to enable and false to disable. |
Implements OpenGL::Surface.
|
overridevirtual |
Allocate storage for surface.
width | The desired logical width. |
height | The desired logical height. |
Implements OpenGL::Surface.
Reimplemented in OpenGL::FakeTexture.
|
inlineoverridevirtual |
Implements OpenGL::Surface.
Reimplemented in OpenGL::FakeTexture.
|
overridevirtual |
Update underlying OpenGL texture to reflect current state.
Implements OpenGL::Surface.
Reimplemented in OpenGL::TextureRGBA8888Swap, OpenGL::TextureRGB555, and OpenGL::FakeTexture.
|
inlineoverridevirtual |
Obtain underlying OpenGL texture.
Implements OpenGL::Surface.