public abstract

Inheritance Graph

graph BT
	MeshDataStrategy
	DataStrategy --> MeshDataStrategy
	SimpleMeshDataStrategy --> MeshDataStrategy
	click MeshDataStrategy "classRendering_1_1MeshDataStrategy"
	click DataStrategy "classMinSG_1_1OutOfCore_1_1DataStrategy"
	click SimpleMeshDataStrategy "classRendering_1_1SimpleMeshDataStrategy"

Description

Determines the strategy how the index and vertex data of a mesh is handled (uploaded, downloaded, deletet, …). Different simple behaviors can be realized with this class directly, other strategies (e.g. with a more sophisticated memory management) can use this class as a base.

Note: All instances of this class should be created only once and re-used (they are probably never deleted)

Note: If a mesh does not have a data-strategy, the default strategy is used.

Note: If an implementation does make use of gl-calls, be carefull if the mesh is accesed from a non-gl-thread.

Public Static Functions

   
   
MeshDataStrategy * getDefaultStrategy()
   
void setDefaultStrategy( MeshDataStrategy * newDefault)

Public Functions

   
   
  MeshDataStrategy()
   
  ~MeshDataStrategy()
   
void assureLocalVertexData( Mesh * m)
   
void assureLocalIndexData( Mesh * m)
   
void prepare( Mesh * m)
   
void displayMesh( RenderingContext & context, Mesh * m, uint32_t firstElement, uint32_t elementCount)

Protected Static Functions

   
   
void doDisplayMesh( RenderingContext & context, Mesh * m, uint32_t firstElement, uint32_t elementCount)
(internal) Actually bind the buffers and render the mesh.

Documentation

function
Rendering::MeshDataStrategy::getDefaultStrategy

public static
   
   
MeshDataStrategy * getDefaultStrategy( )

Returns an instance of the default strategy as singleton.

Defined in Rendering/Mesh/MeshDataStrategy.h:36


function
Rendering::MeshDataStrategy::setDefaultStrategy

public static
     
     
void setDefaultStrategy( MeshDataStrategy * newDefault )

Defined in Rendering/Mesh/MeshDataStrategy.h:37


function
Rendering::MeshDataStrategy::MeshDataStrategy

public inline
   
   
MeshDataStrategy( )

Defined in Rendering/Mesh/MeshDataStrategy.h:42


function
Rendering::MeshDataStrategy::~MeshDataStrategy

public inline virtual
   
   
~MeshDataStrategy( )

Defined in Rendering/Mesh/MeshDataStrategy.h:43


function
Rendering::MeshDataStrategy::assureLocalVertexData

public virtual
     
     
void assureLocalVertexData( Mesh * m )

If the Mesh has vertex data, assure that it can be accessed locally (e.g. by downloading it from graphics memory)o

Defined in Rendering/Mesh/MeshDataStrategy.h:48


function
Rendering::MeshDataStrategy::assureLocalIndexData

public virtual
     
     
void assureLocalIndexData( Mesh * m )

If the Mesh has index data, assure that it can be accessed locally (e.g. by downloading it from graphics memory)o

Defined in Rendering/Mesh/MeshDataStrategy.h:53


function
Rendering::MeshDataStrategy::prepare

public virtual
     
     
void prepare( Mesh * m )

Prepare the Mesh for display (VBO creation, etc.)o

Defined in Rendering/Mesh/MeshDataStrategy.h:57


function
Rendering::MeshDataStrategy::displayMesh

public virtual
     
     
void displayMesh( RenderingContext & context,
  Mesh * m,
  uint32_t firstElement,
  uint32_t elementCount
)    

Display the mesh as VBO or VertexArray.o

Defined in Rendering/Mesh/MeshDataStrategy.h:61


function
Rendering::MeshDataStrategy::doDisplayMesh

protected static
     
     
void doDisplayMesh( RenderingContext & context,
  Mesh * m,
  uint32_t firstElement,
  uint32_t elementCount
)    

(internal) Actually bind the buffers and render the mesh.

Defined in Rendering/Mesh/MeshDataStrategy.h:65