Fixed instancing rendering
(Finally fixed that bug) Lowered required instance count to ten Former-commit-id: 6aeb69eb8ca08727a029e07080aed558e1d1f089
This commit is contained in:
parent
9d35e40a23
commit
ae316394f9
|
|
@ -30,7 +30,7 @@
|
||||||
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
|
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
|
||||||
|
|
||||||
// À partir de combien d'instances d'un même mesh/matériau l'instancing doit-il être utilisé ?
|
// À partir de combien d'instances d'un même mesh/matériau l'instancing doit-il être utilisé ?
|
||||||
#define NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT 100
|
#define NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT 10
|
||||||
|
|
||||||
// Utilise un tracker pour repérer les éventuels leaks (Ralentit l'exécution)
|
// Utilise un tracker pour repérer les éventuels leaks (Ralentit l'exécution)
|
||||||
#define NAZARA_GRAPHICS_MEMORYLEAKTRACKER 0
|
#define NAZARA_GRAPHICS_MEMORYLEAKTRACKER 0
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@ namespace
|
||||||
const NzRenderTarget* s_target;
|
const NzRenderTarget* s_target;
|
||||||
const NzShader* s_shader;
|
const NzShader* s_shader;
|
||||||
const NzVertexBuffer* s_vertexBuffer;
|
const NzVertexBuffer* s_vertexBuffer;
|
||||||
const NzVertexDeclaration* s_instancingDeclaration;
|
|
||||||
bool s_capabilities[nzRendererCap_Max+1];
|
bool s_capabilities[nzRendererCap_Max+1];
|
||||||
bool s_instancing;
|
bool s_instancing;
|
||||||
bool s_useSamplerObjects;
|
bool s_useSamplerObjects;
|
||||||
|
|
@ -1655,7 +1654,7 @@ bool NzRenderer::EnsureStateUpdate()
|
||||||
|
|
||||||
// Notre clé est composée de ce qui définit un VAO
|
// Notre clé est composée de ce qui définit un VAO
|
||||||
const NzVertexDeclaration* vertexDeclaration = s_vertexBuffer->GetVertexDeclaration();
|
const NzVertexDeclaration* vertexDeclaration = s_vertexBuffer->GetVertexDeclaration();
|
||||||
const NzVertexDeclaration* instancingDeclaration = (s_instancing) ? s_instancingDeclaration : nullptr;
|
const NzVertexDeclaration* instancingDeclaration = (s_instancing) ? s_instanceBuffer.GetVertexDeclaration() : nullptr;
|
||||||
VAO_Key key(s_indexBuffer, s_vertexBuffer, vertexDeclaration, instancingDeclaration);
|
VAO_Key key(s_indexBuffer, s_vertexBuffer, vertexDeclaration, instancingDeclaration);
|
||||||
|
|
||||||
// On recherche un VAO existant avec notre configuration
|
// On recherche un VAO existant avec notre configuration
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue