TDME2 1.9.121
Public Member Functions | Private Attributes | Friends | List of all members
VBOManager Class Referencefinal

VBO manager. More...

#include <tdme/engine/subsystems/manager/VBOManager.h>

Collaboration diagram for VBOManager:
Collaboration graph

Public Member Functions

 VBOManager (Renderer *renderer)
 Public constructor. More...
 
 ~VBOManager ()
 Destructor. More...
 
VBOManager_VBOManagedaddVBO (const string &vboId, int32_t ids, bool useGPUMemory, bool shared, bool &created)
 Adds a VBO to manager or retrieve VBO if existing. More...
 
VBOManager_VBOManagedgetVBO (const string &vboId)
 Retrieves a VBO managed from manager. More...
 
void removeVBO (const string &vboId)
 Removes a VBO from manager. More...
 

Private Attributes

Rendererrenderer { nullptr }
 
unordered_map< string, VBOManager_VBOManaged * > vbos
 
ReadWriteLock rwLock
 

Friends

class VBOManager_VBOManaged
 

Detailed Description

VBO manager.

Author
Andreas Drewke
Version
$Id$

Definition at line 24 of file VBOManager.h.

Constructor & Destructor Documentation

◆ VBOManager()

VBOManager ( Renderer renderer)

Public constructor.

Definition at line 21 of file VBOManager.cpp.

◆ ~VBOManager()

~VBOManager ( )

Destructor.

Definition at line 25 of file VBOManager.cpp.

Member Function Documentation

◆ addVBO()

VBOManager_VBOManaged * addVBO ( const string &  vboId,
int32_t  ids,
bool  useGPUMemory,
bool  shared,
bool &  created 
)

Adds a VBO to manager or retrieve VBO if existing.

Parameters
vboIdVBO id
idsVBOs to allocate
useGPUMemoryuse GPU memory
sharedshared between different threads
createdreturns if VBO was just created

Definition at line 31 of file VBOManager.cpp.

◆ getVBO()

VBOManager_VBOManaged * getVBO ( const string &  vboId)

Retrieves a VBO managed from manager.

Parameters
vboIdVBO id
Returns
VBO managed or nullptr

Definition at line 57 of file VBOManager.cpp.

◆ removeVBO()

void removeVBO ( const string &  vboId)

Removes a VBO from manager.

Parameters
vboIdVBO id

Definition at line 73 of file VBOManager.cpp.

Friends And Related Function Documentation

◆ VBOManager_VBOManaged

friend class VBOManager_VBOManaged
friend

Definition at line 26 of file VBOManager.h.

Member Data Documentation

◆ renderer

Renderer* renderer { nullptr }
private

Definition at line 29 of file VBOManager.h.

◆ rwLock

ReadWriteLock rwLock
private

Definition at line 31 of file VBOManager.h.

◆ vbos

unordered_map<string, VBOManager_VBOManaged*> vbos
private

Definition at line 30 of file VBOManager.h.


The documentation for this class was generated from the following files: