Remade instancing
Former-commit-id: b297ed84e86a714c58d42219cc1dd8337e3a732c
This commit is contained in:
@@ -17,13 +17,20 @@ class NzScene;
|
||||
class NAZARA_API NzAbstractRenderTechnique : NzNonCopyable
|
||||
{
|
||||
public:
|
||||
NzAbstractRenderTechnique() = default;
|
||||
NzAbstractRenderTechnique();
|
||||
virtual ~NzAbstractRenderTechnique();
|
||||
|
||||
virtual void Clear(const NzScene* scene) = 0;
|
||||
virtual void Draw(const NzScene* scene) = 0;
|
||||
|
||||
virtual void EnableInstancing(bool instancing);
|
||||
|
||||
virtual NzAbstractRenderQueue* GetRenderQueue() = 0;
|
||||
|
||||
virtual bool IsInstancingEnabled() const;
|
||||
|
||||
protected:
|
||||
bool m_instancingEnabled;
|
||||
};
|
||||
|
||||
#endif // NAZARA_ABSTRACTRENDERTECHNIQUE_HPP
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user