SDK/DebugSystem: Add EnableDepthBuffer

This commit is contained in:
Lynix
2019-11-30 15:32:23 +01:00
parent ae996ae09d
commit 960eb5f475
3 changed files with 166 additions and 137 deletions

View File

@@ -22,6 +22,10 @@ namespace Ndk
DebugSystem();
~DebugSystem() = default;
void EnableDepthBuffer(bool enable);
inline bool IsDepthBufferEnabled() const;
static SystemIndex systemIndex;
private:
@@ -29,14 +33,13 @@ namespace Ndk
Nz::InstancedRenderableRef GenerateCollision2DMesh(Entity* entity, Nz::Vector3f* offset);
Nz::InstancedRenderableRef GenerateCollision3DMesh(Entity* entity);
std::pair<Nz::IndexBufferRef, Nz::VertexBufferRef> GetBoxMesh();
Nz::MaterialRef GetCollisionMaterial();
Nz::MaterialRef GetGlobalAABBMaterial();
Nz::MaterialRef GetLocalAABBMaterial();
Nz::MaterialRef GetOBBMaterial();
std::pair<Nz::IndexBufferRef, Nz::VertexBufferRef> GetBoxMesh();
void OnEntityValidation(Entity* entity, bool justAdded) override;
void OnUpdate(float elapsedTime) override;
Nz::MaterialRef m_globalAabbMaterial;
@@ -45,6 +48,7 @@ namespace Ndk
Nz::MaterialRef m_obbMaterial;
Nz::IndexBufferRef m_boxMeshIndexBuffer;
Nz::VertexBufferRef m_boxMeshVertexBuffer;
bool m_isDepthBufferEnabled;
};
}

View File

@@ -4,3 +4,10 @@
#include <NDK/Systems/DebugSystem.hpp>
namespace Ndk
{
inline bool DebugSystem::IsDepthBufferEnabled() const
{
return m_isDepthBufferEnabled;
}
}