Class DebugUiOverlay

java.lang.Object
dev.engine.graphics.common.DebugUiOverlay
All Implemented Interfaces:
AutoCloseable

public class DebugUiOverlay extends Object implements 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 Details

    • DebugUiOverlay

      public DebugUiOverlay(RenderDevice device)
  • Method Details

    • init

      public void init(dev.engine.ui.NkFont font, ShaderManager shaderManager, GpuResourceManager gpu)
      Initializes GPU resources. Must be called after the device is ready.
      Parameters:
      font - the font to use for text rendering
      shaderManager - compiles the Slang shader to the correct backend target
      gpu - 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 render
      viewportWidth - the current viewport width
      viewportHeight - the current viewport height
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable