My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::CDynamicRenderable Class Reference

a base class for rendering objects using dynamic buffer from memory data. More...

#include <DynamicRenderable.h>

Inheritance diagram for ParaEngine::CDynamicRenderable:
ParaEngine::IsoSurfaceRenderable

Public Member Functions

HRESULT DrawPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount)
 
HRESULT DrawIndexedPrimitive (D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
 Based on indexing, renders the specified geometric primitive into an array of vertices.
 
void PrepareBuffers (int nVertexCount, int nIndexCount)
 call this function when the vertex or index buffer size changes. More...
 
bool lock ()
 it locks everything for the caller to prevent simultaneous access. More...
 
bool unlock ()
 it unlocks everything for the caller to prevent simultaneous access. More...
 

Public Attributes

int m_nFVF
 
int m_nVertexBufSize
 
int m_nIndexBufSize
 
vector< Vector3m_Positions
 
vector< Vector3m_Normals
 
vector< DWORD > m_Colors
 
vector< Vector2m_UVs
 
vector< unsigned short > m_indices
 

Detailed Description

a base class for rendering objects using dynamic buffer from memory data.

it does not create vertex or index buffer, instead it just feeds raw triangles into the dynamic buffer Usage: derive your class or keep a member of this class.

Member Function Documentation

§ lock()

bool ParaEngine::CDynamicRenderable::lock ( )

it locks everything for the caller to prevent simultaneous access.

§ PrepareBuffers()

void ParaEngine::CDynamicRenderable::PrepareBuffers ( int  nVertexCount,
int  nIndexCount 
)

call this function when the vertex or index buffer size changes.

Parameters
nVertexCountsize of the vertex buffer
nIndexCountsize of the index buffer, if 0 index buffer is not used.

§ unlock()

bool ParaEngine::CDynamicRenderable::unlock ( )

it unlocks everything for the caller to prevent simultaneous access.


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