Fixing debug display with depth test enabled

This commit is contained in:
2026-08-09 15:28:41 -04:00
parent 430cf35345
commit 7c18804df6
2 changed files with 12 additions and 17 deletions
+2 -9
View File
@@ -6,7 +6,6 @@
#include <Core/HAL/Mouse/Mouse.h>
#include <Graphics/Camera.h>
#include <imgui.h>
#include <math.h>
namespace
{
@@ -89,14 +88,8 @@ void UpdateDebugController(float dt)
gYaw += mouseDelta.X * sensitivity;
gPitch -= mouseDelta.Y * sensitivity;
if (gPitch > 1.5f)
{
gPitch = 1.5f;
}
if (gPitch < -1.5f)
{
gPitch = -1.5f;
}
gPitch = std::min(gPitch, 1.5f);
gPitch = std::max(gPitch, -1.5f);
if (Juliet::IsKeyDown(Juliet::ScanCode::Q))
{
@@ -300,6 +300,8 @@ namespace Juliet
// Render depth-tested primitives (vertices at offset 0 in buffer)
if (g_DebugState.DepthTestedVertexCount > 0 && g_DebugState.DepthTestedPipeline && g_DebugState.VertexBuffer)
{
BindGraphicsPipeline(renderPass, g_DebugState.DepthTestedPipeline);
// Pack VP matrix + buffer index into push constants
PushData pushData = {};
pushData.ViewProjection = Camera_GetViewProjectionMatrix(camera);