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::DisplayObject Class Referenceabstract

Class for managing display objects. More...

Inheritance diagram for Burger::DisplayObject:
Collaboration diagram for Burger::DisplayObject:

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
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.
 
virtual uint_t CheckLoad (Display *pDisplay)=0
 Load data onto the video display card.
 
virtual void Release (Display *pDisplay)=0
 Release hardware resources.
 
- Public Member Functions inherited from Burger::ReferenceCounter
const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 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 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
 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 Member Functions

 DisplayObject (void)
 Add this display object to the global linked list.
 
virtual ~DisplayObject ()
 Remove this display object from the global linked list.
 

Protected Attributes

DisplayObjectm_pNextDisplayObject
 Pointer to the next DisplayObject.
 
DisplayObjectm_pPrevDisplayObject
 Pointer to the previous DisplayObject.
 

Static Protected Attributes

static DisplayObjectg_pHead = NULL
 Global pointer to the linked list of display objects.
 

Private Member Functions

 DisplayObject (const DisplayObject &)=delete
 
DisplayObjectoperator= (const DisplayObject &)=delete
 
 DisplayObject (DisplayObject &&)=delete
 
DisplayObjectoperator= (DisplayObject &&)=delete
 

Detailed Description

Class for managing display objects.


This class is adds an object intended for rendering onto a GPU or other video display device where the GPU could flush the data and needs a mechanism to clear and / or restore graphic objects into a video display card.

See also
Display, TextureOpenGL or TextureDirectX9

Constructor & Destructor Documentation

◆ DisplayObject() [1/3]

Burger::DisplayObject::DisplayObject ( const DisplayObject & )
privatedelete

◆ DisplayObject() [2/3]

Burger::DisplayObject::DisplayObject ( DisplayObject && )
privatedelete

◆ DisplayObject() [3/3]

Burger::DisplayObject::DisplayObject ( void )
protected

Add this display object to the global linked list.


To allow all display objects to get an event such as a reload due to video display card loss, this function will add this DisplayObject to the global list

See also
~DisplayObject()

◆ ~DisplayObject()

Burger::DisplayObject::~DisplayObject ( )
protectedvirtual

Remove this display object from the global linked list.


To allow all display objects to get an event such as a reload due to video card loss, this function will remove this DisplayObject from the global list

See also
DisplayObject(void)

Member Function Documentation

◆ CheckLoad()

virtual uint_t Burger::DisplayObject::CheckLoad ( Display * pDisplay)
pure virtual

Load data onto the video display card.


Allow the derived class to load a display object from disk or memory and convert into a proper data for uploading onto the display card.

Returns
Zero if no error, non zero if the object couldn't be loaded
See also
Release(Display *)

Implemented in Burger::Effect2DDX9, Burger::Effect2DOpenGL, Burger::EffectPositionColorTextureDX9, Burger::EffectPositionColorTextureOpenGL, Burger::EffectPositionTextureDX9, Burger::EffectPositionTextureOpenGL, Burger::Shader2DCColorDX9, Burger::Shader2DCColorOpenGL, Burger::Shader2DColorVertexDX9, Burger::Shader2DColorVertexOpenGL, Burger::Texture, Burger::TextureDirectX9, Burger::TextureOpenGL, Burger::VertexBuffer, Burger::VertexBufferDirectX9, and Burger::VertexBufferOpenGL.

◆ get_StaticRTTI()

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

◆ GetFirstObject()

static DisplayObject * Burger::DisplayObject::GetFirstObject ( void )
inlinestatic

Get the first display object in the global linked list.


To traverse the linked list of display objects, use this function to get the first display object and if not NULL, use GetNext(void) const to get the next display object until the end of the linked list is reached when a NULL is found.

Returns
NULL if no display objects exist or a valid DisplayObject pointer at the head of the list.
See also
GetNext(void) const or GetPrevious(void) const

◆ GetNext()

DisplayObject * Burger::DisplayObject::GetNext ( void ) const
inline

Get the next display object in the global linked list.


Return the pointer to the next display object in the linked list.

Returns
NULL if no display objects exist or the next valid DisplayObject pointer.
See also
GetFirstObject(void) or GetPrevious(void) const

◆ GetPrevious()

DisplayObject * Burger::DisplayObject::GetPrevious ( void ) const
inline

Get the previous display object in the global linked list.


Return the pointer to the previous display object in the linked list.

Returns
NULL if no display objects exist or the previous valid DisplayObject pointer.
See also
GetFirstObject(void) or GetNext(void) const

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ Release()

◆ ReleaseAll()

void BURGER_API Burger::DisplayObject::ReleaseAll ( Display * pDisplay)
static

Release all display objects.


Iterate over every display object in existence and release them from the display instance.

Member Data Documentation

◆ g_pHead

Burger::DisplayObject * Burger::DisplayObject::g_pHead = NULL
staticprotected

Global pointer to the linked list of display objects.

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::DisplayObject::g_StaticRTTI
static

The global description of the class.


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

◆ m_pNextDisplayObject

DisplayObject* Burger::DisplayObject::m_pNextDisplayObject
protected

Pointer to the next DisplayObject.

◆ m_pPrevDisplayObject

DisplayObject* Burger::DisplayObject::m_pPrevDisplayObject
protected

Pointer to the previous DisplayObject.