Isle
Loading...
Searching...
No Matches
TglImpl::TextureImpl Class Reference

[AI] Implements Tgl::Texture using a Direct3DRMTexture; provides upload and palette control [AI] More...

#include <impl.h>

Inheritance diagram for TglImpl::TextureImpl:
Collaboration diagram for TglImpl::TextureImpl:

Public Types

typedef IDirect3DRMTexture * TextureDataType
 [AI] Internal type for Direct3DRMTexture pointer [AI] More...
 

Public Member Functions

 TextureImpl ()
 [AI] Initializes texture pointer [AI] More...
 
 ~TextureImpl () override
 [AI] Releases on destruction [AI] More...
 
void * ImplementationDataPtr () override
 Returns implementation pointer for texture [AI]. More...
 
Result SetTexels (int width, int height, int bitsPerTexel, void *pTexels) override
 Sets texel data for the texture [AI]. More...
 
void FillRowsOfTexture (int y, int height, void *pBuffer) override
 Fills rows of the texture [AI]. More...
 
Result Changed (int texelsChanged, int paletteChanged) override
 Notifies that texels or palette have changed [AI]. More...
 
Result GetBufferAndPalette (int *pWidth, int *pHeight, int *pDepth, void **ppBuffer, int *ppPaletteSize, PaletteEntry **ppPalette) override
 Returns current buffer and palette [AI]. More...
 
Result SetPalette (int entryCount, PaletteEntry *entries) override
 Sets the palette entries for the texture [AI]. More...
 
const TextureDataTypeImplementationData () const
 Gets Direct3DRMTexture pointer (const) [AI]. More...
 
TextureDataTypeImplementationData ()
 Gets Direct3DRMTexture pointer (mutable) [AI]. More...
 
void SetImplementation (IDirect3DRMTexture *pData)
 Replaces implementation pointer [AI]. More...
 
void Destroy ()
 Frees the texture [AI]. More...
 
virtual Result SetTexels (int width, int height, int bitsPerTexel, void *pTexels)=0
 [AI] Sets the texture image data (texels and size). More...
 
virtual void FillRowsOfTexture (int y, int height, void *pBuffer)=0
 [AI] Fills lines of texel data in the image buffer. More...
 
virtual Result Changed (int texelsChanged, int paletteChanged)=0
 [AI] Notifies of changes to texels or palette. More...
 
virtual Result GetBufferAndPalette (int *pWidth, int *pHeight, int *pDepth, void **ppBuffer, int *pPaletteSize, PaletteEntry **ppPalette)=0
 [AI] Retrieves texture buffer and palette for external access. More...
 
virtual Result SetPalette (int entryCount, PaletteEntry *pEntries)=0
 [AI] Assigns a palette to the texture. More...
 
- Public Member Functions inherited from Tgl::Object
virtual ~Object ()
 [AI] Destructor; releases resources. More...
 
virtual void * ImplementationDataPtr ()=0
 [AI] Returns a pointer to internal/implementation data, if any. More...
 

Static Public Member Functions

static Result SetImage (IDirect3DRMTexture *pSelf, TglD3DRMIMAGE *pImage)
 Copies palette/texel data from TglD3DRMIMAGE to Direct3DRMTexture [AI]. More...
 

Friends

class RendererImpl
 

Detailed Description

[AI] Implements Tgl::Texture using a Direct3DRMTexture; provides upload and palette control [AI]

Definition at line 1268 of file impl.h.

Member Typedef Documentation

◆ TextureDataType

typedef IDirect3DRMTexture* TglImpl::TextureImpl::TextureDataType

[AI] Internal type for Direct3DRMTexture pointer [AI]

Definition at line 1331 of file impl.h.

Constructor & Destructor Documentation

◆ TextureImpl()

TglImpl::TextureImpl::TextureImpl ( )
inline

[AI] Initializes texture pointer [AI]

Definition at line 1271 of file impl.h.

◆ ~TextureImpl()

TglImpl::TextureImpl::~TextureImpl ( )
inlineoverride

[AI] Releases on destruction [AI]

Definition at line 1274 of file impl.h.

Member Function Documentation

◆ Changed()

Result TextureImpl::Changed ( int  texelsChanged,
int  paletteChanged 
)
overridevirtual

Notifies that texels or palette have changed [AI].

Parameters
texelsChangedFlag [AI]
paletteChangedFlag [AI]

Implements Tgl::Texture.

Definition at line 185 of file texture.cpp.

◆ Destroy()

void TglImpl::TextureImpl::Destroy ( )
inline

Frees the texture [AI].

Frees texture and any resources if loaded [AI].

Definition at line 1383 of file impl.h.

◆ FillRowsOfTexture()

void TextureImpl::FillRowsOfTexture ( int  y,
int  height,
void *  pBuffer 
)
overridevirtual

Fills rows of the texture [AI].

Parameters
yRow [AI]
heightNumber of rows [AI]
pBufferBuffer for texels [AI]

Implements Tgl::Texture.

Definition at line 178 of file texture.cpp.

◆ GetBufferAndPalette()

Result TextureImpl::GetBufferAndPalette ( int *  pWidth,
int *  pHeight,
int *  pDepth,
void **  ppBuffer,
int *  ppPaletteSize,
PaletteEntry **  ppPalette 
)
overridevirtual

Returns current buffer and palette [AI].

Parameters
pWidthWidth output [AI]
pHeightHeight output [AI]
pDepthBits per texel output [AI]
ppBufferTexel data pointer output [AI]
ppPaletteSizePalette size output [AI]
ppPalettePalette entries output [AI]

Implements Tgl::Texture.

Definition at line 191 of file texture.cpp.

◆ ImplementationData() [1/2]

TextureDataType & TglImpl::TextureImpl::ImplementationData ( )
inline

Gets Direct3DRMTexture pointer (mutable) [AI].

Definition at line 1343 of file impl.h.

◆ ImplementationData() [2/2]

const TextureDataType & TglImpl::TextureImpl::ImplementationData ( ) const
inline

Gets Direct3DRMTexture pointer (const) [AI].

Definition at line 1337 of file impl.h.

◆ ImplementationDataPtr()

void * TextureImpl::ImplementationDataPtr ( )
overridevirtual

Returns implementation pointer for texture [AI].

Implements Tgl::Object.

Definition at line 228 of file texture.cpp.

◆ SetImage()

Result TextureImpl::SetImage ( IDirect3DRMTexture *  pSelf,
TglD3DRMIMAGE pImage 
)
static

Copies palette/texel data from TglD3DRMIMAGE to Direct3DRMTexture [AI].

Parameters
pSelfTexture pointer [AI]
pImageTglD3DRMIMAGE pointer [AI]

Definition at line 16 of file texture.cpp.

◆ SetImplementation()

void TglImpl::TextureImpl::SetImplementation ( IDirect3DRMTexture *  pData)
inline

Replaces implementation pointer [AI].

Parameters
pDataTexture pointer [AI]

Definition at line 1349 of file impl.h.

◆ SetPalette()

Result TextureImpl::SetPalette ( int  entryCount,
PaletteEntry entries 
)
overridevirtual

Sets the palette entries for the texture [AI].

Parameters
entryCountPalette entry count [AI]
entriesPalette data [AI]

Implements Tgl::Texture.

Definition at line 216 of file texture.cpp.

◆ SetTexels()

Result TextureImpl::SetTexels ( int  width,
int  height,
int  bitsPerTexel,
void *  pTexels 
)
overridevirtual

Sets texel data for the texture [AI].

Parameters
widthWidth [AI]
heightHeight [AI]
bitsPerTexelBits per texel [AI]
pTexelsBuffer pointer [AI]

Implements Tgl::Texture.

Definition at line 167 of file texture.cpp.

Friends And Related Function Documentation

◆ RendererImpl

friend class RendererImpl
friend

Definition at line 1356 of file impl.h.


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