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 Member Functions | Static Public Attributes | Protected Attributes | List of all members
Burger::TextureDirectX9 Class Reference

Class for containing raw images. More...

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

Public Member Functions

const Burger::StaticRTTIget_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
 
IDirect3DTexture9GetTexture (void) const
 
- Public Member Functions inherited from Burger::Texture
 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 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
 
- Static Public Attributes inherited from Burger::Texture
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 Attributes

IDirect3DTexture9m_pD3DTexture
 
- Protected Attributes inherited from Burger::Texture
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.
 

Additional Inherited Members

- Public Types inherited from Burger::Texture
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 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 Types inherited from Burger::Texture
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 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 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

See also
Texture or TextureOpenGL

Constructor & Destructor Documentation

◆ TextureDirectX9() [1/2]

Burger::TextureDirectX9::TextureDirectX9 ( )

Default constructor.


Initialize to an empty image

◆ TextureDirectX9() [2/2]

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

◆ ~TextureDirectX9()

Burger::TextureDirectX9::~TextureDirectX9 ( )
virtual

Default destructor.


Release all data

See also
Shutdown(void)

Member Function Documentation

◆ CheckLoad()

uint_t Burger::TextureDirectX9::CheckLoad ( Display * pDisplay)
overridevirtual

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::Texture.

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::TextureDirectX9::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::Texture.

◆ GetD3DFormat()

uint_t BURGER_API Burger::TextureDirectX9::GetD3DFormat ( void ) const

◆ GetTexture()

IDirect3DTexture9 * Burger::TextureDirectX9::GetTexture ( void ) const
inline

◆ Release()

void Burger::TextureDirectX9::Release ( Display * pDisplay)
overridevirtual

Release hardware resources.


Allow the derived class to release hardware resources

See also
CheckLoad(Display *)

Implements Burger::Texture.

Member Data Documentation

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::TextureDirectX9::g_StaticRTTI
static

◆ m_pD3DTexture

IDirect3DTexture9* Burger::TextureDirectX9::m_pD3DTexture
protected