Class for containing raw images. More...
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
TextureDirectX9 () | |
Default constructor. | |
TextureDirectX9 (eWrapping uWrapping, eFilter uFilter) | |
virtual | ~TextureDirectX9 () |
Default destructor. | |
uint_t | CheckLoad (Display *pDisplay) override |
Load the pixel data. | |
void | Release (Display *pDisplay) override |
Release hardware resources. | |
uint_t | GetD3DFormat (void) const |
IDirect3DTexture9 * | GetTexture (void) const |
![]() | |
Texture () | |
Default constructor. | |
Texture (eWrapping uWrapping, eFilter uFilter) | |
Default constructor. | |
virtual | ~Texture () |
Default destructor. | |
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 Image * | GetImage (void) const |
Get a pointer to the contained Image record. | |
Image * | GetImage (void) |
Get a pointer to the contained Image record. | |
const uint8_t * | GetImage (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. | |
uint_t | GetTextureID (void) const |
![]() | |
DisplayObject * | GetNext (void) const |
Get the next display object in the global linked list. | |
DisplayObject * | GetPrevious (void) const |
Get the previous display object in the global linked list. | |
![]() | |
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. | |
![]() | |
const char * | get_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 |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Attributes | |
IDirect3DTexture9 * | m_pD3DTexture |
![]() | |
LoaderProc | m_pLoader |
Function to load the image in case of texture purge. | |
void * | m_pUserData |
Pointer to user data for the loader. | |
uint_t | m_uTextureID |
OpenGL Texture ID. | |
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. | |
![]() | |
DisplayObject * | m_pNextDisplayObject |
Pointer to the next DisplayObject. | |
DisplayObject * | m_pPrevDisplayObject |
Pointer to the previous DisplayObject. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
static int | GetWrapping (eWrapping uWrapping) |
static int | GetFilter (eFilter uFilter) |
![]() | |
static DisplayObject * | GetFirstObject (void) |
Get the first display object in the global linked list. | |
static void | ReleaseAll (Display *pDisplay) |
Release all display objects. | |
![]() | |
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... | |
![]() | |
DisplayObject (void) | |
Add this display object to the global linked list. | |
virtual | ~DisplayObject () |
Remove this display object from the global linked list. | |
![]() | |
static DisplayObject * | g_pHead = NULL |
Global pointer to the linked list of display objects. | |
Class for containing raw images.
This class is the mechanism for loading and saving popular file formats for image files such as TGA, LBM, PCX, PNG and the like. It's used as input for the Burger::Texture manager to convert the data from an image into a hardware texture for GPU rendering. Graphics tools can use this class exclusively for image conversion and manipulation
Burger::TextureDirectX9::TextureDirectX9 | ( | ) |
Default constructor.
Initialize to an empty image
|
virtual |
Default destructor.
Release all data
Load the pixel data.
Allow the derived class to load a texture from disk and convert into a proper Image
Reimplemented from Burger::Texture.
|
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.
Reimplemented from Burger::Texture.
uint_t BURGER_API Burger::TextureDirectX9::GetD3DFormat | ( | void | ) | const |
|
inline |
|
overridevirtual |
Release hardware resources.
Allow the derived class to release hardware resources
Reimplemented from Burger::Texture.
|
static |
|
protected |