Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::TextureOpenGL Class Reference
Inheritance diagram for Burger::TextureOpenGL:
Collaboration diagram for Burger::TextureOpenGL:

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 TextureOpenGL ()
 
 TextureOpenGL (eWrapping uWrapping, eFilter uFilter)
 
virtual ~TextureOpenGL ()
 
uint_t CheckLoad (Display *pDisplay) override
 Load the pixel data.
 
void Release (Display *pDisplay) override
 Release hardware resources.
 
uint_t GetTextureID (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_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.
 
- 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 char * get_class_name (void) const noexcept
 Get the name of the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Member Functions

static int GetWrapping (eWrapping uWrapping)
 
static int GetFilter (eFilter uFilter)
 
- 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.
 

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

uint_t m_uTextureID
 OpenGL Texture ID.
 
- Protected Attributes inherited from Burger::Texture
LoaderProc m_pLoader
 Function to load the image in case of texture purge.
 
void * m_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.
 
- 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.
 

Constructor & Destructor Documentation

◆ TextureOpenGL() [1/2]

Burger::TextureOpenGL::TextureOpenGL ( )

◆ TextureOpenGL() [2/2]

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

◆ ~TextureOpenGL()

virtual Burger::TextureOpenGL::~TextureOpenGL ( )
virtual

Member Function Documentation

◆ CheckLoad()

uint_t Burger::TextureOpenGL::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::TextureOpenGL::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.

◆ GetFilter()

static int Burger::TextureOpenGL::GetFilter ( eFilter uFilter)
static

◆ GetTextureID()

uint_t Burger::TextureOpenGL::GetTextureID ( void ) const
inline

◆ GetWrapping()

static int Burger::TextureOpenGL::GetWrapping ( eWrapping uWrapping)
static

◆ Release()

void Burger::TextureOpenGL::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::TextureOpenGL::g_StaticRTTI
static

◆ m_uTextureID

uint_t Burger::TextureOpenGL::m_uTextureID
protected

OpenGL Texture ID.