group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DebugUI.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
7
8#include <SDL3/SDL.h>
9
10#include <glm/vec3.hpp>
11
12class ParticleSystem;
13
28{
29public:
33 bool init(SDL_Window* window);
34
36 void shutdown();
37
40 void processEvent(const SDL_Event* event);
41
43 void newFrame();
44
58 void buildUI(const Registry& registry,
59 int tickCount,
60 float& mouseSensitivity,
61 bool& renderSeparateFromPhysics,
62 bool& inputSyncedWithPhysics,
63 bool& limitFPSToMonitor,
64 int& ssrMode,
65 float physicsHz,
66 float fpsCurrent,
67 float fpsMin,
68 float fpsMax,
69 float fps1pLow,
70 float fps5pLow);
71
76 void buildParticleUI(ParticleSystem& ps, glm::vec3 eyePos, glm::vec3 forward);
77
80 void buildRenderTogglesUI(struct RenderToggles& toggles);
81
83 void buildSkyboxUI(class Renderer& renderer);
84
86 void buildLightingUI(class Renderer& renderer);
87
89 void render();
90
91private:
93 bool showPosition = true;
94 bool showPrevPosition = false;
95 bool showVelocity = true;
96 bool showCollisionShape = true;
97 bool showPlayerState = true;
98 bool showInputSnapshot = true;
99 bool showViewAngles = true;
100 bool showMovementChart = true;
101
105 void buildMovementChart(const Registry& registry);
106
107 // Particle UI state
108 float particleSpawnDist_ = 200.f;
109 bool showParticleWindow_ = true;
110};
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
Forward-declared to avoid pulling in heavy particle headers.
Definition DebugUI.hpp:28
void processEvent(const SDL_Event *event)
Forward an SDL event to the ImGui input backend.
Definition DebugUI.cpp:88
void newFrame()
Begin a new ImGui frame. Call before any ImGui draw calls.
Definition DebugUI.cpp:93
void shutdown()
Destroy the ImGui context and shut down the SDL3 input backend.
Definition DebugUI.cpp:82
bool init(SDL_Window *window)
Create the ImGui context and initialise the SDL3 input backend.
Definition DebugUI.cpp:64
void render()
Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().
Definition DebugUI.cpp:733
void buildUI(const Registry &registry, int tickCount, float &mouseSensitivity, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, int &ssrMode, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
Build the ECS inspector window contents.
Definition DebugUI.cpp:100
void buildRenderTogglesUI(struct RenderToggles &toggles)
Build the Render Toggles window for live performance profiling.
Definition DebugUI.cpp:574
void buildLightingUI(class Renderer &renderer)
Build the Lighting Controls window for live parameter tuning.
Definition DebugUI.cpp:649
void buildSkyboxUI(class Renderer &renderer)
Build the Skybox selector window for live HDR skybox swapping.
Definition DebugUI.cpp:695
void buildParticleUI(ParticleSystem &ps, glm::vec3 eyePos, glm::vec3 forward)
Build the Particle System debug/control window.
Definition DebugUI.cpp:470
Top-level particle system orchestrator.
Definition ParticleSystem.hpp:35
SDL3 GPU renderer with forward PBR pipeline.
Definition Renderer.hpp:77
Forward-declared to avoid circular includes.
Definition Renderer.hpp:23