|
group2 0.1.0
CSE 125 Group 2
|
Forward-declared to avoid pulling in heavy particle headers. More...
#include <DebugUI.hpp>
Public Member Functions | |
| bool | init (SDL_Window *window) |
| Create the ImGui context and initialise the SDL3 input backend. | |
| void | shutdown () |
| Destroy the ImGui context and shut down the SDL3 input backend. | |
| void | processEvent (const SDL_Event *event) |
| Forward an SDL event to the ImGui input backend. | |
| void | newFrame () |
| Begin a new ImGui frame. Call before any ImGui draw calls. | |
| void | buildUI (const Registry ®istry, 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. | |
| void | buildParticleUI (ParticleSystem &ps, glm::vec3 eyePos, glm::vec3 forward) |
| Build the Particle System debug/control window. | |
| void | buildRenderTogglesUI (struct RenderToggles &toggles) |
| Build the Render Toggles window for live performance profiling. | |
| void | buildSkyboxUI (class Renderer &renderer) |
| Build the Skybox selector window for live HDR skybox swapping. | |
| void | buildLightingUI (class Renderer &renderer) |
| Build the Lighting Controls window for live parameter tuning. | |
| void | render () |
| Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame(). | |
Forward-declared to avoid pulling in heavy particle headers.
Live ECS inspector overlay powered by Dear ImGui.
Ownership split:
imgui_impl_sdl3 input backend, UI stateimgui_impl_sdlgpu3 render backend (owns the GPU device)Initialisation order in Game::init():
debugUI.init(window) — context must exist before GPU backend initrenderer.init(window) — GPU backend init happens hereShutdown order in Game::quit():
renderer.quit() — GPU backend shutdown firstdebugUI.shutdown() — context destroyed last | void DebugUI::buildLightingUI | ( | class Renderer & | renderer | ) |
Build the Lighting Controls window for live parameter tuning.
| void DebugUI::buildParticleUI | ( | ParticleSystem & | ps, |
| glm::vec3 | eyePos, | ||
| glm::vec3 | forward | ||
| ) |
| void DebugUI::buildRenderTogglesUI | ( | struct RenderToggles & | toggles | ) |
Build the Render Toggles window for live performance profiling.
| toggles | The renderer's toggle struct (read/write). |
| void DebugUI::buildSkyboxUI | ( | class Renderer & | renderer | ) |
Build the Skybox selector window for live HDR skybox swapping.
| void DebugUI::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.
| registry | The ECS registry to inspect. |
| tickCount | Total physics ticks elapsed. |
| mouseSensitivity | Radians per pixel; slider (read/write). |
| renderSeparateFromPhysics | Interpolated unlimited-fps mode toggle (read/write). |
| inputSyncedWithPhysics | Sample input once per tick vs every frame (read/write). |
| limitFPSToMonitor | VSync on/off toggle (read/write). |
| physicsHz | Measured physics tick rate (Hz). |
| fpsCurrent | Most-recent render FPS sample. |
| fpsMin | Minimum FPS in the rolling window. |
| fpsMax | Maximum FPS in the rolling window. |
| fps1pLow | 1st-percentile FPS (1 % low). |
| fps5pLow | 5th-percentile FPS (5 % low). |
| bool DebugUI::init | ( | SDL_Window * | window | ) |
Create the ImGui context and initialise the SDL3 input backend.
| window | The SDL window receiving input events. |
| void DebugUI::newFrame | ( | ) |
Begin a new ImGui frame. Call before any ImGui draw calls.
| void DebugUI::processEvent | ( | const SDL_Event * | event | ) |
Forward an SDL event to the ImGui input backend.
| event | The event to process. |
| void DebugUI::render | ( | ) |
Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().
| void DebugUI::shutdown | ( | ) |
Destroy the ImGui context and shut down the SDL3 input backend.