|
My Project
|
a base class for rendering objects using dynamic buffer from memory data. More...
#include <DynamicRenderable.h>
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< Vector3 > | m_Positions |
| vector< Vector3 > | m_Normals |
| vector< DWORD > | m_Colors |
| vector< Vector2 > | m_UVs |
| vector< unsigned short > | m_indices |
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.
| bool ParaEngine::CDynamicRenderable::lock | ( | ) |
it locks everything for the caller to prevent simultaneous access.
| void ParaEngine::CDynamicRenderable::PrepareBuffers | ( | int | nVertexCount, |
| int | nIndexCount | ||
| ) |
call this function when the vertex or index buffer size changes.
| nVertexCount | size of the vertex buffer |
| nIndexCount | size of the index buffer, if 0 index buffer is not used. |
| bool ParaEngine::CDynamicRenderable::unlock | ( | ) |
it unlocks everything for the caller to prevent simultaneous access.
1.8.12