Added support for Instancing

Former-commit-id: 62f5f3186423b01f7a0ac2762969dca12bea1327
This commit is contained in:
Lynix
2013-02-26 01:40:57 +01:00
parent 9b2eb8ce3f
commit 3b0751fb88
6 changed files with 337 additions and 24 deletions

View File

@@ -27,16 +27,27 @@ class NzVertexDeclaration;
class NAZARA_API NzRenderer
{
public:
struct InstancingData
{
NzMatrix4f worldMatrix;
};
NzRenderer() = delete;
~NzRenderer() = delete;
static void Clear(unsigned long flags = nzRendererClear_Color | nzRendererClear_Depth);
static void DrawIndexedPrimitives(nzPrimitiveType primitive, unsigned int firstIndex, unsigned int indexCount);
static void DrawIndexedPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveType primitive, unsigned int firstIndex, unsigned int indexCount);
static void DrawPrimitives(nzPrimitiveType primitive, unsigned int firstVertex, unsigned int vertexCount);
static void DrawPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveType primitive, unsigned int firstVertex, unsigned int vertexCount);
static void Enable(nzRendererParameter parameter, bool enable);
static void FillInstancingBuffer(const InstancingData* instancingData, unsigned int instanceCount);
static void Flush();
static float GetLineWidth();
//static NzMatrix4f GetMatrix(nzMatrixCombination combination);
static NzMatrix4f GetMatrix(nzMatrixType type);