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 | Private Member Functions | List of all members
Burger::VertexBufferOpenGL Class Reference
Inheritance diagram for Burger::VertexBufferOpenGL:
Inheritance graph
[legend]
Collaboration diagram for Burger::VertexBufferOpenGL:
Collaboration graph
[legend]

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 VertexBufferOpenGL ()
 
virtual ~VertexBufferOpenGL ()
 
uint_t CheckLoad (Display *pDisplay) override
 Upload vertex data from VRAM.
 
void Release (Display *pDisplay) override
 Release vertex data from VRAM.
 
- Public Member Functions inherited from Burger::VertexBuffer
 VertexBuffer ()
 Default constructor.
 
virtual ~VertexBuffer ()
 Default destructor.
 
uint_t LoadData (Display *pDisplay, const VertexAoS_t *pDescription)
 Load vertex data to VRAM.
 
void PurgeData (void)
 Release allocated memory buffers.
 
D3DVertexBufferGetD3DVertexBuffer (void) const
 
D3DVertexDeclarationGetD3DVertexDescription (void) const
 
D3DIndexBufferGetD3DIndexBuffer (void) const
 
IDirect3DVertexBuffer9GetDX9VertexBuffer (void) const
 
IDirect3DVertexDeclaration9GetDX9VertexDescription (void) const
 
IDirect3DIndexBuffer9GetDX9IndexBuffer (void) const
 
uint_t GetVertexArrayObject (void) const
 
uint_t GetElementID (void) const
 
uint_t GetBufferID (void) const
 
uint_t GetStride (void) const
 
uint_t GetArrayEntryCount (void) const
 
uint_t GetElementEntryCount (void) const
 
- 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::VertexBuffer
static const Burger::StaticRTTI g_StaticRTTI
 
static const uint_t g_ChunkElementSizes [5] = {4,4,4,4,1}
 Size of each element for the USAGE_* chunk sizes.
 
static const uint_t g_ChunkElementCounts [5] = {1,2,3,4,4}
 Number of elements for the USAGE_* chunks.
 
- 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.
 

Private Member Functions

 VertexBufferOpenGL (const VertexBufferOpenGL &)=delete
 
VertexBufferOpenGLoperator= (const VertexBufferOpenGL &)=delete
 
 VertexBufferOpenGL (VertexBufferOpenGL &&)=delete
 
VertexBufferOpenGLoperator= (VertexBufferOpenGL &&)=delete
 

Additional Inherited Members

- Public Types inherited from Burger::VertexBuffer
enum  eUsage {
  USAGE_CHUNKMASK = 0xFF0 , USAGE_CHUNKMASKSHIFT = 4 , USAGE_TYPEMASK =0xF000 , USAGE_TYPEMASKSHIFT = 12 ,
  USAGE_FLOAT1 = 0<<USAGE_CHUNKMASKSHIFT , USAGE_FLOAT2 = 1<<USAGE_CHUNKMASKSHIFT , USAGE_FLOAT3 = 2<<USAGE_CHUNKMASKSHIFT , USAGE_FLOAT4 = 3<<USAGE_CHUNKMASKSHIFT ,
  USAGE_COLOR4 = 4<<USAGE_CHUNKMASKSHIFT , USAGE_POSITION =0<<USAGE_TYPEMASKSHIFT , USAGE_BLENDWEIGHT =1<<USAGE_TYPEMASKSHIFT , USAGE_BLENDINDICES =2<<USAGE_TYPEMASKSHIFT ,
  USAGE_NORMAL =3<<USAGE_TYPEMASKSHIFT , USAGE_PSIZE =4<<USAGE_TYPEMASKSHIFT , USAGE_TEXCOORD =5<<USAGE_TYPEMASKSHIFT , USAGE_TANGENT =6<<USAGE_TYPEMASKSHIFT ,
  USAGE_BINORMAL =7<<USAGE_TYPEMASKSHIFT , USAGE_TESSFACTOR =8<<USAGE_TYPEMASKSHIFT , USAGE_POSITIONT =9<<USAGE_TYPEMASKSHIFT , USAGE_COLOR =10<<USAGE_TYPEMASKSHIFT ,
  USAGE_FOG =11<<USAGE_TYPEMASKSHIFT , USAGE_DEPTH =12<<USAGE_TYPEMASKSHIFT , USAGE_SAMPLE =13<<USAGE_TYPEMASKSHIFT , FLAGAOS_DONTCOPY_VERTICES = 1<<0 ,
  FLAGAOS_DONTCOPY_ELEMENTS = 1<<1 , FLAGAOS_DONTCOPY_MEMBERS = 1<<2 , FLAGAOS_VERTICES_DYNAMIC = 1<<3 , FLAGAOS_ELEMENTS_32BIT = 1<<4 ,
  FLAG_VERTEXDIRTY = 1<<30 , USAGE_END =0x7FFFFFFFU
}
 
- 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.
 
- Protected Attributes inherited from Burger::VertexBuffer
const voidm_pVertexArray
 Pointer to the vertex data to upload, if NULL don't upload data.
 
uintptr_t m_uVertexArraySize
 Size in bytes of the entire vertex buffer, if 0, don't generate vertex data.
 
const voidm_pElements
 Pointer to the element index data to upload, NULL don't upload data.
 
uintptr_t m_uElementSize
 Size in bytes of the entire element buffer, if 0, don't generate an element index array.
 
const uint_tm_pMembers
 Pointer to array of array description enumerations.
 
D3DVertexBufferm_pD3DVertexBuffer
 (XBox 360 Only) DirectX vertex buffer
 
D3DVertexDeclarationm_pD3DVertexDeclaration
 (XBox 360 Only) DirectX vertex array description
 
D3DIndexBufferm_pD3DIndexBuffer
 (XBox 360 Only) DirectX index buffer
 
union { 
 
   struct { 
 
      IDirect3DVertexBuffer9 *   m_pVertexBuffer 
 DirectX 9 vertex buffer. More...
 
      IDirect3DVertexDeclaration9 *   m_pDescription 
 DirectX 9 vertex array description. More...
 
      IDirect3DIndexBuffer9 *   m_pIndexBuffer 
 DirectX 9 index buffer. More...
 
   }   m_DX9 
 DirectX 9 specific data. More...
 
   struct { 
 
      uint_t   m_uVertexArrayObjectID 
 (OpenGL only) Main Vertex Object Array More...
 
      uint_t   m_uElementID 
 (OpenGL only) ID to the index array More...
 
      uint_t   m_uBufferID 
 (OpenGL only) ID for the buffer More...
 
   }   m_GL 
 OpenGL specific data. More...
 
m_Platform 
 Union of vertex buffer data for the platform.
 
uint_t m_uStride
 Size in bytes of each entry in the vertex array.
 
uint_t m_uArrayEntryCount
 Number of entries in the vertex array.
 
uint_t m_uElementEntryCount
 Number of entries in the element array.
 
uint_t m_uMemberCount
 Number of entries in the member array.
 
uint_t m_uFlags
 Flags describing how to treat the data.
 
- Protected Attributes inherited from Burger::DisplayObject
DisplayObjectm_pNextDisplayObject
 Pointer to the next DisplayObject.
 
DisplayObjectm_pPrevDisplayObject
 Pointer to the previous DisplayObject.
 
- Static Protected Attributes inherited from Burger::DisplayObject
static DisplayObjectg_pHead = NULL
 Global pointer to the linked list of display objects.
 

Constructor & Destructor Documentation

◆ VertexBufferOpenGL() [1/3]

Burger::VertexBufferOpenGL::VertexBufferOpenGL ( const VertexBufferOpenGL & )
privatedelete

◆ VertexBufferOpenGL() [2/3]

Burger::VertexBufferOpenGL::VertexBufferOpenGL ( VertexBufferOpenGL && )
privatedelete

◆ VertexBufferOpenGL() [3/3]

Burger::VertexBufferOpenGL::VertexBufferOpenGL ( )

◆ ~VertexBufferOpenGL()

virtual Burger::VertexBufferOpenGL::~VertexBufferOpenGL ( )
virtual

Member Function Documentation

◆ CheckLoad()

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

Upload vertex data from VRAM.


If any data needed to be uploaded to VRAM, upload it.

Parameters
pDisplayPointer to the parent display device
Returns
Zero on success, non-zero on failure
See also
Release(Display *)

Implements Burger::VertexBuffer.

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::VertexBufferOpenGL::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::VertexBuffer.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ Release()

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

Release vertex data from VRAM.


If any data was uploaded to VRAM, release it.

Parameters
pDisplayPointer to the parent display device
See also
CheckLoad(Display *)

Implements Burger::VertexBuffer.

Member Data Documentation

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::VertexBufferOpenGL::g_StaticRTTI
static