Carna  Version 3.3.2
Public Types | Static Public Member Functions | Protected Member Functions | List of all members
Carna::base::ManagedMesh< VertexType, IndexType > Class Template Reference

Implements MeshBase class for particular VertexType and IndexType. More...

#include <ManagedMesh.h>

+ Inheritance diagram for Carna::base::ManagedMesh< VertexType, IndexType >:
+ Collaboration diagram for Carna::base::ManagedMesh< VertexType, IndexType >:

Public Types

typedef VertexType Vertex
 Holds the element type of the vertex buffer.
 
typedef IndexType Index
 Holds the element type of the index buffer.
 
- Public Types inherited from Carna::base::ManagedMeshBase
typedef ManagedMeshInterface ManagedInterface
 Defines the type to be used for interfacing the video resource.
 

Static Public Member Functions

static ManagedMesh< VertexType, IndexType > & create (unsigned int primitiveType, const VertexType *vertices, const std::size_t vertexCount, const IndexType *indices, const std::size_t indexCount)
 Instantiates. Call release when you do not need the object any longer.
 

Protected Member Functions

virtual VertexBufferBaseloadVertexBuffer () override
 Creates OpenGL vertex buffer object and fills it with data.
 
virtual IndexBufferBaseloadIndexBuffer () override
 Creates OpenGL index buffer object and fills it with data.
 
- Protected Member Functions inherited from Carna::base::ManagedMeshBase
 ManagedMeshBase (unsigned int primitiveType, const VertexAttributes &va)
 Instantiates.
 
virtual ~ManagedMeshBase ()
 Deletes.
 
void acquireMesh ()
 Acquires mesh within current OpenGL context.
 
void releaseMesh ()
 Releases mesh within current OpenGL context.
 
const MeshBasemesh () const
 References mesh within current OpenGL context.
 
- Protected Member Functions inherited from Carna::base::GeometryFeature
 GeometryFeature ()
 Instantiates.
 
virtual ~GeometryFeature ()
 Deletes and logs an error if video resources are leaked.
 

Additional Inherited Members

- Public Member Functions inherited from Carna::base::ManagedMeshBase
virtual bool controlsSameVideoResource (const GeometryFeature &) const override
 Tells whether this instance maintains the same video resources like other.
 
virtual ManagedMeshInterfaceacquireVideoResource () override
 Acquires the video resources from this GeometryFeature by returning new instance of a class derived from ManagedInterface, that realizes the RAII idiom. Refer to its documentation for details. May return nullptr if this GeometryFeature does not provide any video resources.
 
- Public Member Functions inherited from Carna::base::GeometryFeature
unsigned int videoResourceAcquisitionsCount () const
 Tells current number of video resource acquisitions.
 
void release ()
 Denotes that this object is no longer required and may be deleted as soon as it is valid to delete it. More...
 
void addTo (Geometry &sceneGraphNode, unsigned int role)
 Puts this geometry feature on the sceneGraphNode. More...
 
void removeFrom (Geometry &sceneGraphNode)
 Removes this geometry feature from the sceneGraphNode. More...
 
- Public Attributes inherited from Carna::base::ManagedMeshBase
const unsigned int primitiveType
 Holds the primitive type, like GL_TRIANGLES, that should be used when rendering this mesh.
 
const VertexAttributes vertexAttributes
 Holds the vertex format of the vertices contained by the vertex buffer.
 

Detailed Description

template<typename VertexType, typename IndexType>
class Carna::base::ManagedMesh< VertexType, IndexType >

Implements MeshBase class for particular VertexType and IndexType.

Parameters
VertexTypespecifies the vertex buffer format.
VertexTypespecifies the index buffer format.
See also
The MeshFactory class contains a few examples.
Author
Leonid Kostrykin
Date
22.2.15 - 24.3.15

Definition at line 147 of file ManagedMesh.h.


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