#include <texture.h>
Public Member Functions | |
virtual void | destroy ()=0 |
virtual void | recreate ()=0 |
virtual void | enableLinearFiltering (bool enable)=0 |
virtual void | allocate (uint width, uint height)=0 |
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 uint | getWidth () const =0 |
virtual uint | getHeight () const =0 |
virtual Graphics::PixelFormat | getFormat () const =0 |
virtual Graphics::Surface * | getSurface ()=0 |
virtual const Graphics::Surface * | getSurface () const =0 |
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) |
virtual void | updateGLTexture ()=0 |
virtual const Texture & | getGLTexture () const =0 |
Protected Member Functions | |
void | clearDirty () |
void | addDirtyArea (const Common::Rect &r) |
Common::Rect | getDirtyArea () const |
Interface for OpenGL implementations of a 2D surface.
|
pure virtual |
Destroy OpenGL description of surface.
Implemented in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::TextureSurface.
|
pure virtual |
Recreate OpenGL description of surface.
Implemented in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::TextureSurface.
|
pure virtual |
Enable or disable linear texture filtering.
enable | true to enable and false to disable. |
Implemented in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::TextureSurface.
|
pure virtual |
Allocate storage for surface.
width | The desired logical width. |
height | The desired logical height. |
Implemented in OpenGL::TextureSurfaceCLUT8GPU, OpenGL::FakeTextureSurface, and OpenGL::TextureSurface.
|
inlinevirtual |
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 in OpenGL::FakeTextureSurface.
void OpenGL::Surface::copyRectToTexture | ( | uint | x, |
uint | y, | ||
uint | w, | ||
uint | h, | ||
const void * | src, | ||
uint | srcPitch | ||
) |
Copy image data to the surface.
The format of the input data needs to match the format returned by getFormat.
x | X coordinate of upper left corner to copy data to. |
y | Y coordinate of upper left corner to copy data to. |
w | Width of the image data to copy. |
h | Height of the image data to copy. |
src | Pointer to image data. |
srcPitch | The number of bytes in a row of the image data. |
void OpenGL::Surface::fill | ( | uint32 | color | ) |
Fill the surface with a fixed color.
color | Color value in format returned by getFormat. |
|
pure virtual |
Implemented in OpenGL::TextureSurfaceCLUT8GPU, OpenGL::FakeTextureSurface, and OpenGL::TextureSurface.
|
inlinevirtual |
Reimplemented in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::FakeTextureSurface.
|
inlinevirtual |
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 in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::FakeTextureSurface.
|
pure virtual |
Update underlying OpenGL texture to reflect current state.
Implemented in OpenGL::TextureSurfaceCLUT8GPU, OpenGL::TextureSurfaceRGBA8888Swap, OpenGL::TextureSurfaceRGB555, OpenGL::FakeTextureSurface, and OpenGL::TextureSurface.
|
pure virtual |
Obtain underlying OpenGL texture.
Implemented in OpenGL::TextureSurfaceCLUT8GPU, and OpenGL::TextureSurface.