ScummVM API documentation
OpenGL::TextureSurface Class Reference

#include <texture.h>

Inheritance diagram for OpenGL::TextureSurface:
OpenGL::Surface OpenGL::FakeTextureSurface OpenGL::TextureSurfaceRGB555

Public Member Functions

 TextureSurface (GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format)
 
void destroy () override
 
void recreate () override
 
void enableLinearFiltering (bool enable) override
 
void setRotation (Common::RotationMode rotation) override
 
void allocate (uint width, uint height) override
 
uint getWidth () const override
 
uint getHeight () const override
 
Graphics::PixelFormat getFormat () const override
 
Graphics::SurfacegetSurface () override
 
const Graphics::SurfacegetSurface () const override
 
void updateGLTexture () override
 
const TexturegetGLTexture () 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
 

Detailed Description

An OpenGL texture wrapper. It automatically takes care of all OpenGL texture handling issues and also provides access to the texture data.

Constructor & Destructor Documentation

◆ TextureSurface()

OpenGL::TextureSurface::TextureSurface ( GLenum  glIntFormat,
GLenum  glFormat,
GLenum  glType,
const Graphics::PixelFormat format 
)

Create a new texture with the specific internal format.

Parameters
glIntFormatThe internal format to use.
glFormatThe input format.
glTypeThe input type.
formatThe format used for the texture input.

Member Function Documentation

◆ destroy()

void OpenGL::TextureSurface::destroy ( )
overridevirtual

Destroy OpenGL description of surface.

Implements OpenGL::Surface.

◆ recreate()

void OpenGL::TextureSurface::recreate ( )
overridevirtual

Recreate OpenGL description of surface.

Implements OpenGL::Surface.

◆ enableLinearFiltering()

void OpenGL::TextureSurface::enableLinearFiltering ( bool  enable)
overridevirtual

Enable or disable linear texture filtering.

Parameters
enabletrue to enable and false to disable.

Implements OpenGL::Surface.

◆ setRotation()

void OpenGL::TextureSurface::setRotation ( Common::RotationMode  rotation)
overridevirtual

Sets the rotate parameter of the texture

Parameters
rotationHow to rotate the texture

Implements OpenGL::Surface.

◆ allocate()

void OpenGL::TextureSurface::allocate ( uint  width,
uint  height 
)
overridevirtual

Allocate storage for surface.

Parameters
widthThe desired logical width.
heightThe desired logical height.

Implements OpenGL::Surface.

Reimplemented in OpenGL::FakeTextureSurface.

◆ getFormat()

Graphics::PixelFormat OpenGL::TextureSurface::getFormat ( ) const
inlineoverridevirtual
Returns
The logical format of the texture data.

Implements OpenGL::Surface.

Reimplemented in OpenGL::FakeTextureSurface.

◆ updateGLTexture()

void OpenGL::TextureSurface::updateGLTexture ( )
overridevirtual

Update underlying OpenGL texture to reflect current state.

Implements OpenGL::Surface.

Reimplemented in OpenGL::TextureSurfaceRGB555, and OpenGL::FakeTextureSurface.

◆ getGLTexture()

const Texture& OpenGL::TextureSurface::getGLTexture ( ) const
inlineoverridevirtual

Obtain underlying OpenGL texture.

Implements OpenGL::Surface.


The documentation for this class was generated from the following file: