Class DebugUiOverlay
java.lang.Object
dev.engine.graphics.common.DebugUiOverlay
- All Implemented Interfaces:
AutoCloseable
Renders the debug UI overlay using the engine's graphics API.
Compiles the UI shader via ShaderManager (Slang → GLSL/SPIRV/WGSL),
manages the font atlas texture, and converts NkDrawList output
into GPU draw calls each frame.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidinit(dev.engine.ui.NkFont font, ShaderManager shaderManager, GpuResourceManager gpu) Initializes GPU resources.voidrender(dev.engine.ui.NkContext ctx, int viewportWidth, int viewportHeight) Renders the UI overlay for the current frame.
-
Constructor Details
-
DebugUiOverlay
-
-
Method Details
-
init
Initializes GPU resources. Must be called after the device is ready.- Parameters:
font- the font to use for text renderingshaderManager- compiles the Slang shader to the correct backend targetgpu- the GPU resource manager for tracked resource creation/destruction
-
render
public void render(dev.engine.ui.NkContext ctx, int viewportWidth, int viewportHeight) Renders the UI overlay for the current frame.- Parameters:
ctx- the UI context to renderviewportWidth- the current viewport widthviewportHeight- the current viewport height
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-