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 Summary
Modifier and TypeMethodDescriptionvoidfinish(RenderDevice device) Cleans up after a frame.voidprepare(RenderDevice device, List<DrawCommand> batch) Prepares GPU resources for a frame's draw commands.voidrecord(RenderDevice device, CommandRecorder recorder, DrawCommand command, int index) Records draw commands for a single draw command entry.
-
Method Details
-
prepare
Prepares GPU resources for a frame's draw commands. Called once per frame before any draw calls. -
record
Records draw commands for a single draw command entry. Called once per entity in the batch. -
finish
Cleans up after a frame. Called once per frame after all draw calls.
-