Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
Burger::Texture Class Referenceabstract

Class for managing hardware images. More...

Inheritance diagram for Burger::Texture:
Inheritance graph
[legend]
Collaboration diagram for Burger::Texture:
Collaboration graph
[legend]

Public Types

enum  eWrapping { WRAP_REPEAT , WRAP_CLAMP }
 Texture filter enumeration. More...
 
enum  eFilter { FILTER_NEAREST , FILTER_LINEAR }
 Texture filter enumeration. More...
 
enum  eLoader { LOADER_LOAD , LOADER_UNLOAD , LOADER_SHUTDOWN }
 Texture callback command enumeration. More...
 
typedef uint_t(* LoaderProc) (Texture *pThis, eLoader uCommand)
 Function prototype for loading callback.
 

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 Texture ()
 Default constructor.
 
 Texture (eWrapping uWrapping, eFilter uFilter)
 Default constructor.
 
virtual ~Texture ()
 Default destructor.
 
uint_t CheckLoad (Display *pDisplay) override=0
 Load the pixel data.
 
void Release (Display *pDisplay) override=0
 Release hardware resources.
 
uint_t LoadImageMemory (void)
 Call the loader callback with the command LOADER_LOAD.
 
void UnloadImageMemory (void)
 Call the loader callback with the command LOADER_UNLOAD.
 
void ShutdownImageMemory (void)
 Call the loader callback with the command LOADER_SHUTDOWN.
 
const ImageGetImage (void) const
 Get a pointer to the contained Image record.
 
ImageGetImage (void)
 Get a pointer to the contained Image record.
 
const uint8_tGetImage (uint_t uMipMap) const
 Get a pointer to the bitmap.
 
uint_t GetWidth (void) const
 Get the width of the texture.
 
uint_t GetWidth (uint_t uMipMap) const
 Get the width of the texture at a mip map level.
 
uint_t GetHeight (void) const
 Get the height of the texture.
 
uint_t GetHeight (uint_t uMipMap) const
 Get the height of the texture at a mip map level.
 
uintptr_t GetStride (void) const
 Get the byte stride of each scan line of the texture.
 
uintptr_t GetStride (uint_t uMipMap) const
 Get the byte stride of each scan line of the texture at a mip map level.
 
Image::ePixelTypes GetType (void) const
 Get the type of data contained in the texture.
 
uint_t GetMipMapCount (void) const
 Get the number of mip map levels.
 
void SetImageDirty (void)
 Set the image updated flag.
 
eWrapping GetWrappingS (void) const
 Get the wrapping setting for the S (U) coordinate.
 
void SetWrappingS (eWrapping uWrapping)
 Set the wrapping setting for the S (U) coordinate.
 
eWrapping GetWrappingT (void) const
 Get the wrapping setting for the T (V) coordinate.
 
void SetWrappingT (eWrapping uWrapping)
 Set the wrapping setting for the T (V) coordinate.
 
void SetWrapping (eWrapping uWrapping)
 Set the wrapping setting for the S and T (U/V) coordinate.
 
eFilter GetMinFilter (void) const
 Get the filter setting for the minimum scaling.
 
void SetMinFilter (eFilter uFilter)
 Set the filter setting for the minimum scaling.
 
eFilter GetMagFilter (void) const
 Get the filter setting for the maximum scaling.
 
void SetMagFilter (eFilter uFilter)
 Set the filter setting for the maximum scaling.
 
void SetFilter (eFilter uFilter)
 Set the filter setting for the minimum and maximum scaling.
 
LoaderProc GetLoader (void) const
 Get the pointer to the texture reload callback.
 
void SetLoader (LoaderProc pCallback)
 Set the function pointer to the texture loading callback.
 
void LoadTGA (RezFile *pRezFile, uint_t uRezNum)
 Set the texture to load the image from a TGA file.
 
void LoadTGA (const char *pFilename)
 Set the texture to load the image from a TGA file.
 
void LoadTGA (Filename *pFilename)
 Set the texture to load the image from a TGA file.
 
void LoadPNG (RezFile *pRezFile, uint_t uRezNum)
 Set the texture to load the image from a PNG file.
 
void LoadPNG (const char *pFilename)
 Set the texture to load the image from a PNG file.
 
void LoadPNG (Filename *pFilename)
 Set the texture to load the image from a PNG file.
 
void LoadBMP (RezFile *pRezFile, uint_t uRezNum)
 Set the texture to load the image from a BMP file.
 
void LoadBMP (const char *pFilename)
 Set the texture to load the image from a BMP file.
 
void LoadBMP (Filename *pFilename)
 Set the texture to load the image from a BMP file.
 
void LoadGIF (RezFile *pRezFile, uint_t uRezNum)
 Set the texture to load the image from a GIF file.
 
void LoadGIF (const char *pFilename)
 Set the texture to load the image from a GIF file.
 
void LoadGIF (Filename *pFilename)
 Set the texture to load the image from a GIF file.
 
- Public Member Functions inherited from Burger::DisplayObject
DisplayObjectGetNext (void) const
 Get the next display object in the global linked list.
 
DisplayObjectGetPrevious (void) const
 Get the previous display object in the global linked list.
 
- Public Member Functions inherited from Burger::ReferenceCounter
 ReferenceCounter () noexcept
 Sets the reference count to zero.
 
virtual ~ReferenceCounter ()
 Destructor.
 
void AddRef (void) noexcept
 Increase the reference count by 1.
 
void Release (void) noexcept
 Decrease the reference count by 1.
 
- Public Member Functions inherited from Burger::Base
const charget_class_name (void) const noexcept
 Get the name of the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Attributes

static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::DisplayObject
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::ReferenceCounter
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 

Protected Types

enum  eDirtyFlags {
  DIRTY_WRAPPING_S =0x01 , DIRTY_WRAPPING_T =0x02 , DIRTY_MIN =0x04 , DIRTY_MAG =0x08 ,
  DIRTY_IMAGE =0x10 , DIRTY_EXTRA =0x20
}
 Bit flags for data to update. More...
 

Protected Attributes

LoaderProc m_pLoader
 Function to load the image in case of texture purge.
 
voidm_pUserData
 Pointer to user data for the loader.
 
Image m_Image
 Description of the texture data.
 
eWrapping m_eWrappingS
 Wrapping setting for the S value.
 
eWrapping m_eWrappingT
 Wrapping setting for the T value.
 
eFilter m_eMinFilter
 Filter for shrinkage.
 
eFilter m_eMagFilter
 Filter for expansion.
 
uint_t m_uDirty
 Values needed to be updated.
 
- Protected Attributes inherited from Burger::DisplayObject
DisplayObjectm_pNextDisplayObject
 Pointer to the next DisplayObject.
 
DisplayObjectm_pPrevDisplayObject
 Pointer to the previous DisplayObject.
 

Private Member Functions

 Texture (const Texture &)=delete
 
Textureoperator= (const Texture &)=delete
 
 Texture (Texture &&)=delete
 
Textureoperator= (Texture &&)=delete
 

Static Private Member Functions

static uint_t CallbackRezFileTGA (Texture *pTexture, eLoader uLoader)
 Private callback to load TGA files from a resource file.
 
static uint_t CallbackFileTGA (Texture *pTexture, eLoader uLoader)
 Private callback to load TGA files from a file.
 
static uint_t CallbackFilenameTGA (Texture *pTexture, eLoader uLoader)
 Private callback to load TGA files from a file.
 
static uint_t CallbackRezFilePNG (Texture *pTexture, eLoader uLoader)
 Private callback to load PNG files from a resource file.
 
static uint_t CallbackFilePNG (Texture *pTexture, eLoader uLoader)
 Private callback to load PNG files from a file.
 
static uint_t CallbackFilenamePNG (Texture *pTexture, eLoader uLoader)
 Private callback to load PNG files from a file.
 
static uint_t CallbackRezFileBMP (Texture *pTexture, eLoader uLoader)
 Private callback to load BMP files from a resource file.
 
static uint_t CallbackFileBMP (Texture *pTexture, eLoader uLoader)
 Private callback to load BMP files from a file.
 
static uint_t CallbackFilenameBMP (Texture *pTexture, eLoader uLoader)
 Private callback to load BMP files from a file.
 
static uint_t CallbackRezFileGIF (Texture *pTexture, eLoader uLoader)
 Private callback to load GIF files from a resource file.
 
static uint_t CallbackFileGIF (Texture *pTexture, eLoader uLoader)
 Private callback to load GIF files from a file.
 
static uint_t CallbackFilenameGIF (Texture *pTexture, eLoader uLoader)
 Private callback to load GIF files from a file.
 

Additional Inherited Members

- Static Public Member Functions inherited from Burger::DisplayObject
static DisplayObjectGetFirstObject (void)
 Get the first display object in the global linked list.
 
static void ReleaseAll (Display *pDisplay)
 Release all display objects.
 
- Protected Member Functions inherited from Burger::DisplayObject
 DisplayObject (void)
 Add this display object to the global linked list.
 
virtual ~DisplayObject ()
 Remove this display object from the global linked list.
 
- Static Protected Attributes inherited from Burger::DisplayObject
static DisplayObjectg_pHead = NULL
 Global pointer to the linked list of display objects.
 

Detailed Description

Class for managing hardware images.


This class is the mechanism for loading raw pixels into a video card for GPU rendering. A mechanism is provided to allow arbitrary uploads to video memory in cases of GPU memory purges by the video display driver

See also
TextureOpenGL or TextureDirectX9

Member Typedef Documentation

◆ LoaderProc

typedef uint_t( * Burger::Texture::LoaderProc) (Texture *pThis, eLoader uCommand)

Function prototype for loading callback.

Member Enumeration Documentation

◆ eDirtyFlags

Bit flags for data to update.


Flags to mark which records have been changed to so they can be uploaded to the device driver

Enumerator
DIRTY_WRAPPING_S 

Set if the S value was changed.

DIRTY_WRAPPING_T 

Set if the T value was changed.

DIRTY_MIN 

Set if the MIN value was changed.

DIRTY_MAG 

Set if the MAG value was changed.

DIRTY_IMAGE 

Set if the image bitmap was changed.

DIRTY_EXTRA 

Flags for derived classes.

◆ eFilter

Texture filter enumeration.


Settings to determine how a texture is filtered when expanded or contracted when being rendered

See also
eWrapping
Enumerator
FILTER_NEAREST 

Faster, use nearest pixel.

FILTER_LINEAR 

Use weighted average for smoothing.

◆ eLoader

Texture callback command enumeration.


When the custom texture loader is called, one of these three commands are passed. LOADER_LOAD is when the Image record needed to be set up, LOADER_UNLOAD when the pixel data can be purged from memory and LOADER_SHUTDOWN when the function will never be called again.

See also
LoadImage(void), UnloadImage(void) or ShutdownImage(void)
Enumerator
LOADER_LOAD 

Command to load a texture into the Image.

LOADER_UNLOAD 

Command to release the memory in the Image if allowed.

LOADER_SHUTDOWN 

Force all memory to be released.

◆ eWrapping

Texture filter enumeration.


Settings to determine how a texture is mapped when U/V coordinates exceeded the range of 0.0f and 1.0f

See also
eFilter
Enumerator
WRAP_REPEAT 

Wrap the texture around.

WRAP_CLAMP 

Clamp the texture edge.

Constructor & Destructor Documentation

◆ Texture() [1/4]

Burger::Texture::Texture ( const Texture & )
privatedelete

◆ Texture() [2/4]

Burger::Texture::Texture ( Texture && )
privatedelete

◆ Texture() [3/4]

Burger::Texture::Texture ( )

Default constructor.


Initialize to an empty texture, set the wrapping to WRAP_REPEAT and filter FILTER_NEAREST

◆ Texture() [4/4]

Burger::Texture::Texture ( eWrapping uWrapping,
eFilter uFilter )

Default constructor.


Initialize to an empty texture, set the wrapping to WRAP_REPEAT and filter FILTER_NEAREST

◆ ~Texture()

Burger::Texture::~Texture ( )
virtual

Default destructor.


Release all data

See also
Shutdown(void)

Member Function Documentation

◆ CallbackFileBMP()

uint_t BURGER_API Burger::Texture::CallbackFileBMP ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load BMP files from a file.


Function to handle the loading and conversion to an Image of a BMP file found in a file

See also
LoadBMP(const char *)

◆ CallbackFileGIF()

uint_t BURGER_API Burger::Texture::CallbackFileGIF ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load GIF files from a file.


Function to handle the loading and conversion to an Image of a GIF file found in a file

See also
LoadGIF(const char *)

◆ CallbackFilenameBMP()

uint_t BURGER_API Burger::Texture::CallbackFilenameBMP ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load BMP files from a file.


Function to handle the loading and conversion to an Image of a BMP file found in a file

See also
LoadBMP(Filename *)

◆ CallbackFilenameGIF()

uint_t BURGER_API Burger::Texture::CallbackFilenameGIF ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load GIF files from a file.


Function to handle the loading and conversion to an Image of a GIF file found in a file

See also
LoadGIF(Filename *)

◆ CallbackFilenamePNG()

uint_t BURGER_API Burger::Texture::CallbackFilenamePNG ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load PNG files from a file.


Function to handle the loading and conversion to an Image of a PNG file found in a file

See also
LoadPNG(Filename *)

◆ CallbackFilenameTGA()

uint_t BURGER_API Burger::Texture::CallbackFilenameTGA ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load TGA files from a file.


Function to handle the loading and conversion to an Image of a TGA file found in a file

See also
LoadTGA(Filename *)

◆ CallbackFilePNG()

uint_t BURGER_API Burger::Texture::CallbackFilePNG ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load PNG files from a file.


Function to handle the loading and conversion to an Image of a PNG file found in a file

See also
LoadPNG(const char *)

◆ CallbackFileTGA()

uint_t BURGER_API Burger::Texture::CallbackFileTGA ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load TGA files from a file.


Function to handle the loading and conversion to an Image of a TGA file found in a file

See also
LoadTGA(const char *)

◆ CallbackRezFileBMP()

uint_t BURGER_API Burger::Texture::CallbackRezFileBMP ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load BMP files from a resource file.


Function to handle the loading and conversion to an Image of a BMP file found in a resource file

See also
LoadBMP(RezFile *,uint_t)

◆ CallbackRezFileGIF()

uint_t BURGER_API Burger::Texture::CallbackRezFileGIF ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load GIF files from a resource file.


Function to handle the loading and conversion to an Image of a GIF file found in a resource file

See also
LoadGIF(RezFile *,uint_t)

◆ CallbackRezFilePNG()

uint_t BURGER_API Burger::Texture::CallbackRezFilePNG ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load PNG files from a resource file.


Function to handle the loading and conversion to an Image of a PNG file found in a resource file

See also
LoadPNG(RezFile *,uint_t)

◆ CallbackRezFileTGA()

uint_t BURGER_API Burger::Texture::CallbackRezFileTGA ( Texture * pTexture,
eLoader uLoader )
staticprivate

Private callback to load TGA files from a resource file.


Function to handle the loading and conversion to an Image of a TGA file found in a resource file

See also
LoadTGA(RezFile *,uint_t)

◆ CheckLoad()

uint_t Burger::Texture::CheckLoad ( Display * pDisplay)
overridepure virtual

Load the pixel data.


Allow the derived class to load a texture from disk and convert into a proper Image

See also
LoadImage(void) or UnloadImage(void)

Implements Burger::DisplayObject.

Implemented in Burger::TextureDirectX9, and Burger::TextureOpenGL.

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::Texture::get_StaticRTTI ( void ) const
overridevirtualnoexcept

Get the description to the class.


This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.

Returns
Pointer to a global, read only instance of StaticRTTI for the true class

Reimplemented from Burger::DisplayObject.

Reimplemented in Burger::TextureDirectX9, and Burger::TextureOpenGL.

◆ GetHeight() [1/2]

uint_t Burger::Texture::GetHeight ( uint_t uMipMap) const
inline

Get the height of the texture at a mip map level.


Parameters
uMipMapMip map level to query
Returns
Height of the texture in the Image record at the mip map level
See also
GetWidth(uint_t) const or GetHeight(void) const

◆ GetHeight() [2/2]

uint_t Burger::Texture::GetHeight ( void ) const
inline

Get the height of the texture.


Returns
Height of the texture in the Image record
See also
GetWidth(void) const or GetHeight(uint_t) const

◆ GetImage() [1/3]

const uint8_t * Burger::Texture::GetImage ( uint_t uMipMap) const
inline

Get a pointer to the bitmap.


Parameters
uMipMapMip map level (0 is for the base bitmap)
Returns
NULL if no bitmap is present or a pointer to the bitmap.
See also
GetImage(void) const or GetImage(void)

◆ GetImage() [2/3]

Image * Burger::Texture::GetImage ( void )
inline

Get a pointer to the contained Image record.


Returns
Pointer to the contained Image record.
See also
GetImage(void) const or GetImage(uint_t) const

◆ GetImage() [3/3]

const Image * Burger::Texture::GetImage ( void ) const
inline

Get a pointer to the contained Image record.


Returns
Pointer to the contained Image record.
See also
GetImage(void) or GetImage(uint_t) const

◆ GetLoader()

LoaderProc Burger::Texture::GetLoader ( void ) const
inline

Get the pointer to the texture reload callback.


Returns
The pointer to the callback function
See also
SetLoader(LoaderProc) or UploadImage(void)

◆ GetMagFilter()

eFilter Burger::Texture::GetMagFilter ( void ) const
inline

Get the filter setting for the maximum scaling.


Returns
The filter setting for the maximum scaling
See also
SetMagFilter(eFilter) or GetMinFilter(void) const

◆ GetMinFilter()

eFilter Burger::Texture::GetMinFilter ( void ) const
inline

Get the filter setting for the minimum scaling.


Returns
The filter setting for the minimum scaling
See also
SetMinFilter(eFilter) or GetMagFilter(void) const

◆ GetMipMapCount()

uint_t Burger::Texture::GetMipMapCount ( void ) const
inline

Get the number of mip map levels.


Returns
Number of mip maps in the texture (Usually 1)
See also
GetType(void) const

◆ GetStride() [1/2]

uintptr_t Burger::Texture::GetStride ( uint_t uMipMap) const
inline

Get the byte stride of each scan line of the texture at a mip map level.


Parameters
uMipMapMip map level to query
Returns
Byte stride of the texture in the Image record at the mip map level
See also
GetWidth(uint_t) const or GetStride(void) const

◆ GetStride() [2/2]

uintptr_t Burger::Texture::GetStride ( void ) const
inline

Get the byte stride of each scan line of the texture.


Returns
Byte stride of the texture in the Image record
See also
GetWidth(void) const or GetStride(uint_t) const

◆ GetType()

Image::ePixelTypes Burger::Texture::GetType ( void ) const
inline

Get the type of data contained in the texture.


Returns
Enumeration of the format of the pixel data
See also
GetMipMapCount(void) const

◆ GetWidth() [1/2]

uint_t Burger::Texture::GetWidth ( uint_t uMipMap) const
inline

Get the width of the texture at a mip map level.


Parameters
uMipMapMip map level to query
Returns
Width of the texture in the Image record at the mip map level
See also
GetHeight(uint_t) const or GetWidth(void) const

◆ GetWidth() [2/2]

uint_t Burger::Texture::GetWidth ( void ) const
inline

Get the width of the texture.


Returns
Width of the texture in the Image record
See also
GetHeight(void) const or GetWidth(uint_t) const

◆ GetWrappingS()

eWrapping Burger::Texture::GetWrappingS ( void ) const
inline

Get the wrapping setting for the S (U) coordinate.


Returns
The wrapping setting for the S (U) coordinate
See also
SetWrappingS(eWrapping) or GetWrappingT(void) const

◆ GetWrappingT()

eWrapping Burger::Texture::GetWrappingT ( void ) const
inline

Get the wrapping setting for the T (V) coordinate.


Returns
The wrapping setting for the T (V) coordinate
See also
SetWrappingT(eWrapping) or GetWrappingS(void) const

◆ LoadBMP() [1/3]

void BURGER_API Burger::Texture::LoadBMP ( const char * pFilename)

Set the texture to load the image from a BMP file.


Set up for loading a hardware texture from a BMP file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(const char *), LoadPNG(const char *) or LoadGIF(const char *)

◆ LoadBMP() [2/3]

void BURGER_API Burger::Texture::LoadBMP ( Filename * pFilename)

Set the texture to load the image from a BMP file.


Set up for loading a hardware texture from a BMP file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(Filename *pFilename), LoadPNG(Filename *pFilename) or LoadGIF(Filename *pFilename)

◆ LoadBMP() [3/3]

void BURGER_API Burger::Texture::LoadBMP ( RezFile * pRezFile,
uint_t uRezNum )

Set the texture to load the image from a BMP file.


Set up for loading a hardware texture from a BMP file stored in a RezFile

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(RezFile *,uint_t), LoadPNG(RezFile *,uint_t) or LoadGIF(RezFile *,uint_t)

◆ LoadGIF() [1/3]

void BURGER_API Burger::Texture::LoadGIF ( const char * pFilename)

Set the texture to load the image from a GIF file.


Set up for loading a hardware texture from a GIF file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(const char *), LoadPNG(const char *) or LoadBMP(const char *)

◆ LoadGIF() [2/3]

void BURGER_API Burger::Texture::LoadGIF ( Filename * pFilename)

Set the texture to load the image from a GIF file.


Set up for loading a hardware texture from a GIF file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(Filename *), LoadPNG(Filename *) or LoadBMP(Filename *)

◆ LoadGIF() [3/3]

void BURGER_API Burger::Texture::LoadGIF ( RezFile * pRezFile,
uint_t uRezNum )

Set the texture to load the image from a GIF file.


Set up for loading a hardware texture from a GIF file stored in a RezFile

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(RezFile *,uint_t), LoadPNG(RezFile *,uint_t) or LoadBMP(RezFile *,uint_t)

◆ LoadImageMemory()

uint_t BURGER_API Burger::Texture::LoadImageMemory ( void )

Call the loader callback with the command LOADER_LOAD.


See also
UnloadImageMemory(void) or ShutdownImageMemory(void)

◆ LoadPNG() [1/3]

void BURGER_API Burger::Texture::LoadPNG ( const char * pFilename)

Set the texture to load the image from a PNG file.


Set up for loading a hardware texture from a PNG file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(const char *), LoadBMP(const char *) or LoadGIF(const char *)

◆ LoadPNG() [2/3]

void BURGER_API Burger::Texture::LoadPNG ( Filename * pFilename)

Set the texture to load the image from a PNG file.


Set up for loading a hardware texture from a PNG file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(Filename *pFilename), LoadBMP(Filename *pFilename) or LoadGIF(Filename *pFilename)

◆ LoadPNG() [3/3]

void BURGER_API Burger::Texture::LoadPNG ( RezFile * pRezFile,
uint_t uRezNum )

Set the texture to load the image from a PNG file.


Set up for loading a hardware texture from a PNG file stored in a RezFile

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(RezFile *,uint_t), LoadBMP(RezFile *,uint_t) or LoadGIF(RezFile *,uint_t)

◆ LoadTGA() [1/3]

void BURGER_API Burger::Texture::LoadTGA ( const char * pFilename)

Set the texture to load the image from a TGA file.


Set up for loading a hardware texture from a TGA file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadPNG(const char *pFilename), LoadBMP(const char *pFilename), LoadGIF(const char *pFilename),

◆ LoadTGA() [2/3]

void BURGER_API Burger::Texture::LoadTGA ( Filename * pFilename)

Set the texture to load the image from a TGA file.


Set up for loading a hardware texture from a TGA file stored in a file

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadTGA(const char *), LoadTGA(RezFile *,uint_t)

◆ LoadTGA() [3/3]

void BURGER_API Burger::Texture::LoadTGA ( RezFile * pRezFile,
uint_t uRezNum )

Set the texture to load the image from a TGA file.


Set up for loading a hardware texture from a TGA file stored in a RezFile

Note
The file is not loaded immediately. It will be loaded after a call to LoadImage(void)
See also
LoadPNG(RezFile *,uint_t), LoadBMP(RezFile *,uint_t) or LoadGIF(RezFile *,uint_t),

◆ operator=() [1/2]

Texture & Burger::Texture::operator= ( const Texture & )
privatedelete

◆ operator=() [2/2]

Texture & Burger::Texture::operator= ( Texture && )
privatedelete

◆ Release()

void Burger::Texture::Release ( Display * pDisplay)
overridepure virtual

Release hardware resources.


Allow the derived class to release hardware resources

See also
CheckLoad(Display *)

Implements Burger::DisplayObject.

Implemented in Burger::TextureDirectX9, and Burger::TextureOpenGL.

◆ SetFilter()

void Burger::Texture::SetFilter ( eFilter uFilter)
inline

Set the filter setting for the minimum and maximum scaling.


Parameters
uFilterThe new wrapping setting for the minimum and maximum scaling
See also
SetMinFilter(eFilter) or SetMagFilter(eFilter)

◆ SetImageDirty()

void Burger::Texture::SetImageDirty ( void )
inline

Set the image updated flag.


If the texture is modified by the application, call this function to alert the texture manager to upload the new bitmap into the hardware on the next rendering pass.

◆ SetLoader()

void Burger::Texture::SetLoader ( LoaderProc pCallback)
inline

Set the function pointer to the texture loading callback.


Parameters
pCallbackThe new pointer to the texture loading callback
See also
GetLoader(void) const or UploadImage(void)

◆ SetMagFilter()

void Burger::Texture::SetMagFilter ( eFilter uFilter)
inline

Set the filter setting for the maximum scaling.


Parameters
uFilterThe new filter setting for the maximum scaling
See also
GetMagFilter(void) const or SetMinFilter(eFilter)

◆ SetMinFilter()

void Burger::Texture::SetMinFilter ( eFilter uFilter)
inline

Set the filter setting for the minimum scaling.


Parameters
uFilterThe new filter setting for the minimum scaling
See also
GetMinFilter(void) const or SetMagFilter(eFilter)

◆ SetWrapping()

void Burger::Texture::SetWrapping ( eWrapping uWrapping)
inline

Set the wrapping setting for the S and T (U/V) coordinate.


Parameters
uWrappingThe new wrapping setting for the S and T (U/V) coordinate
See also
SetWrappingS(eWrapping) or SetWrappingT(eWrapping)

◆ SetWrappingS()

void Burger::Texture::SetWrappingS ( eWrapping uWrapping)
inline

Set the wrapping setting for the S (U) coordinate.


Parameters
uWrappingThe new wrapping setting for the S (U) coordinate
See also
GetWrappingS(void) const or SetWrappingT(eWrapping)

◆ SetWrappingT()

void Burger::Texture::SetWrappingT ( eWrapping uWrapping)
inline

Set the wrapping setting for the T (V) coordinate.


Parameters
uWrappingThe new wrapping setting for the T (V) coordinate
See also
GetWrappingT(void) const or SetWrappingS(eWrapping)

◆ ShutdownImageMemory()

void BURGER_API Burger::Texture::ShutdownImageMemory ( void )

Call the loader callback with the command LOADER_SHUTDOWN.


See also
LoadImageMemory(void) or UnloadImageMemory(void)

◆ UnloadImageMemory()

void BURGER_API Burger::Texture::UnloadImageMemory ( void )

Call the loader callback with the command LOADER_UNLOAD.


See also
LoadImageMemory(void) or ShutdownImageMemory(void)

Member Data Documentation

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::Texture::g_StaticRTTI
static

The global description of the class.


This record contains the name of this class and a reference to the parent

◆ m_eMagFilter

eFilter Burger::Texture::m_eMagFilter
protected

Filter for expansion.

◆ m_eMinFilter

eFilter Burger::Texture::m_eMinFilter
protected

Filter for shrinkage.

◆ m_eWrappingS

eWrapping Burger::Texture::m_eWrappingS
protected

Wrapping setting for the S value.

◆ m_eWrappingT

eWrapping Burger::Texture::m_eWrappingT
protected

Wrapping setting for the T value.

◆ m_Image

Image Burger::Texture::m_Image
protected

Description of the texture data.

◆ m_pLoader

LoaderProc Burger::Texture::m_pLoader
protected

Function to load the image in case of texture purge.

◆ m_pUserData

void* Burger::Texture::m_pUserData
protected

Pointer to user data for the loader.

◆ m_uDirty

uint_t Burger::Texture::m_uDirty
protected

Values needed to be updated.