Public Member Functions | |
FakeTextureSurface (GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format, const Graphics::PixelFormat &fakeFormat) | |
void | allocate (uint width, uint height) override |
void | setMask (const byte *mask) override |
Graphics::PixelFormat | getFormat () const override |
bool | hasPalette () const override |
void | setColorKey (uint colorKey) override |
void | setPalette (uint start, uint colors, const byte *palData) override |
Graphics::Surface * | getSurface () override |
const Graphics::Surface * | getSurface () const override |
void | updateGLTexture () override |
![]() | |
TextureSurface (GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format) | |
void | destroy () override |
void | recreate () override |
void | enableLinearFiltering (bool enable) override |
uint | getWidth () const override |
uint | getHeight () const override |
const Texture & | getGLTexture () const override |
![]() | |
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 void | setScaler (uint scalerIndex, int scaleFactor) |
Protected Member Functions | |
void | applyPaletteAndMask (byte *dst, const byte *src, uint dstPitch, uint srcPitch, uint srcWidth, const Common::Rect &dirtyArea, const Graphics::PixelFormat &dstFormat, const Graphics::PixelFormat &srcFormat) const |
![]() | |
void | updateGLTexture (Common::Rect &dirtyArea) |
![]() | |
void | clearDirty () |
void | addDirtyArea (const Common::Rect &r) |
Common::Rect | getDirtyArea () const |
Protected Attributes | |
Graphics::Surface | _rgbData |
Graphics::PixelFormat | _fakeFormat |
uint32 * | _palette |
uint8 * | _mask |
![]() | |
const Graphics::PixelFormat | _format |
|
overridevirtual |
Allocate storage for surface.
width | The desired logical width. |
height | The desired logical height. |
Reimplemented from OpenGL::TextureSurface.
|
overridevirtual |
Assign a mask to the surface, where a byte value of 0 is black with 0 alpha and 1 is the normal color.
mask | The mask data. |
Reimplemented from OpenGL::Surface.
|
inlineoverridevirtual |
Reimplemented from OpenGL::TextureSurface.
|
inlineoverridevirtual |
Reimplemented from OpenGL::Surface.
|
overridevirtual |
Set color key for paletted textures.
This needs to be called after any palette update affecting the color key. Calling this multiple times will result in multiple color indices to be treated as color keys.
Reimplemented from OpenGL::Surface.
|
overridevirtual |
Update underlying OpenGL texture to reflect current state.
Reimplemented from OpenGL::TextureSurface.
Reimplemented in OpenGL::TextureSurfaceRGBA8888Swap, and OpenGL::TextureSurfaceRGB555.