Remade instancing

Former-commit-id: b297ed84e86a714c58d42219cc1dd8337e3a732c
This commit is contained in:
Lynix
2013-08-07 01:17:20 +02:00
parent c75887f600
commit 69d150272f
6 changed files with 146 additions and 93 deletions

View File

@@ -30,7 +30,7 @@
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
// Le nombre maximum d'instances pouvant être géré par le Renderer
#define NAZARA_RENDERER_MAX_INSTANCES 8192
#define NAZARA_RENDERER_INSTANCE_BUFFER_SIZE 8192*64
// Utilise un tracker pour repérer les éventuels leaks (Ralentit l'exécution)
#define NAZARA_RENDERER_MEMORYLEAKTRACKER 0

View File

@@ -41,8 +41,10 @@ class NAZARA_API NzRenderer
static void Enable(nzRendererParameter parameter, bool enable);
static void Flush();
static NzVertexBuffer* GetInstanceBuffer();
static float GetLineWidth();
static NzMatrix4f GetMatrix(nzMatrixType type);
static nzUInt8 GetMaxAnisotropyLevel();
@@ -72,8 +74,6 @@ class NAZARA_API NzRenderer
static void SetFaceCulling(nzFaceCulling cullingMode);
static void SetFaceFilling(nzFaceFilling fillingMode);
static void SetIndexBuffer(const NzIndexBuffer* indexBuffer);
static void SetInstancingData(const void* instancingData, unsigned int instanceCount);
static void SetInstancingDeclaration(const NzVertexDeclaration* declaration, unsigned int* newMaxInstanceCount);
static void SetLineWidth(float size);
static void SetMatrix(nzMatrixType type, const NzMatrix4f& matrix);
static void SetPointSize(float size);