Interface UploadStrategy

All Known Implementing Classes:
PerObjectUploadStrategy

public interface UploadStrategy
Strategy for uploading scene data to GPU and issuing draw commands.

Implementations control how transforms, materials, and draw calls are organized. The default per-object UBO approach works everywhere but isn't optimal. Batched SSBO + multidraw indirect is faster for large scenes but requires more GPU features.

Users can implement custom strategies for their specific needs.

  • Method Details

    • prepare

      void prepare(RenderDevice device, List<DrawCommand> batch)
      Prepares GPU resources for a frame's draw commands. Called once per frame before any draw calls.
    • record

      void record(RenderDevice device, CommandRecorder recorder, DrawCommand command, int index)
      Records draw commands for a single draw command entry. Called once per entity in the batch.
    • finish

      void finish(RenderDevice device)
      Cleans up after a frame. Called once per frame after all draw calls.