Castor3D  ..
Public Member Functions | Protected Attributes | List of all members
Castor3D::GeometryBuffers Class Referenceabstract

Geometry buffers holder. More...

+ Collaboration diagram for Castor3D::GeometryBuffers:

Public Member Functions

C3D_API GeometryBuffers (eTOPOLOGY p_topology, ShaderProgram const &p_program, VertexBuffer *p_vtx, IndexBuffer *p_idx, VertexBuffer *p_bones, VertexBuffer *p_inst)
 Constructor. More...
 
virtual C3D_API ~GeometryBuffers ()
 Destructor. More...
 
virtual C3D_API bool Draw (uint32_t p_uiSize, uint32_t p_index) const =0
 Draws the geometry held into the buffers. More...
 
virtual C3D_API bool DrawInstanced (uint32_t p_uiSize, uint32_t p_index, uint32_t p_count) const =0
 Draws the geometry held into the buffers. More...
 
ProgramInputLayout const & GetLayout () const
 
eTOPOLOGY GetTopology () const
 
void SetTopology (eTOPOLOGY p_value)
 Sets the buffers topology. More...
 

Protected Attributes

VertexBufferm_vertexBuffer = nullptr
 The vertex buffer. More...
 
IndexBufferm_indexBuffer = nullptr
 The index buffer. More...
 
VertexBufferm_bonesBuffer = nullptr
 The bones buffer. More...
 
VertexBufferm_matrixBuffer = nullptr
 The matrix buffer. More...
 
ProgramInputLayout const & m_layout
 The shader program. More...
 
eTOPOLOGY m_topology
 The buffers topology. More...
 

Detailed Description

Geometry buffers holder.

Author
Sylvain DOREMUS
Version
0.7.0.0
Date
18/11/2012
Remarks
Allows implementations to use API specific optimisations (like OpenGL Vertex array objects)
Acquires it's buffers responsibility when constructed

Constructor & Destructor Documentation

◆ GeometryBuffers()

C3D_API Castor3D::GeometryBuffers::GeometryBuffers ( eTOPOLOGY  p_topology,
ShaderProgram const &  p_program,
VertexBuffer p_vtx,
IndexBuffer p_idx,
VertexBuffer p_bones,
VertexBuffer p_inst 
)

Constructor.

Parameters
[in]p_topologyThe buffers topology.
[in]p_programThe shader program.
[in]p_vtxThe vertex buffer.
[in]p_idxThe index buffer.
[in]p_bonesThe bones data buffer.
[in]p_instThe instances matrices buffer.

◆ ~GeometryBuffers()

virtual C3D_API Castor3D::GeometryBuffers::~GeometryBuffers ( )
virtual

Destructor.

Member Function Documentation

◆ Draw()

virtual C3D_API bool Castor3D::GeometryBuffers::Draw ( uint32_t  p_uiSize,
uint32_t  p_index 
) const
pure virtual

Draws the geometry held into the buffers.

Parameters
[in]p_uiSizeSpecifies the number of elements to be rendered
[in]p_indexSpecifies the starting index in the enabled arrays
Returns
true if OK

◆ DrawInstanced()

virtual C3D_API bool Castor3D::GeometryBuffers::DrawInstanced ( uint32_t  p_uiSize,
uint32_t  p_index,
uint32_t  p_count 
) const
pure virtual

Draws the geometry held into the buffers.

Parameters
[in]p_uiSizeSpecifies the number of elements to be rendered
[in]p_indexSpecifies the starting index in the enabled arrays
[in]p_countThe instances count
Returns
true if OK

◆ GetLayout()

ProgramInputLayout const& Castor3D::GeometryBuffers::GetLayout ( ) const
inline
Returns
The program layout.

References m_layout.

◆ GetTopology()

eTOPOLOGY Castor3D::GeometryBuffers::GetTopology ( ) const
inline
Returns
The buffers topology.

References m_topology.

◆ SetTopology()

void Castor3D::GeometryBuffers::SetTopology ( eTOPOLOGY  p_value)
inline

Sets the buffers topology.

Parameters
[in]p_valueThe new value

References m_topology.

Member Data Documentation

◆ m_bonesBuffer

VertexBuffer* Castor3D::GeometryBuffers::m_bonesBuffer = nullptr
protected

The bones buffer.

◆ m_indexBuffer

IndexBuffer* Castor3D::GeometryBuffers::m_indexBuffer = nullptr
protected

The index buffer.

◆ m_layout

ProgramInputLayout const& Castor3D::GeometryBuffers::m_layout
protected

The shader program.

Referenced by GetLayout().

◆ m_matrixBuffer

VertexBuffer* Castor3D::GeometryBuffers::m_matrixBuffer = nullptr
protected

The matrix buffer.

◆ m_topology

eTOPOLOGY Castor3D::GeometryBuffers::m_topology
protected

The buffers topology.

Referenced by GetTopology(), and SetTopology().

◆ m_vertexBuffer

VertexBuffer* Castor3D::GeometryBuffers::m_vertexBuffer = nullptr
protected

The vertex buffer.


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