#78 Closed
Schematic preview: build geometry once instead of every frame
#enhancement
Problem: SchematicPreviewRenderer.renderPreview rebuilds the geometry of every block every frame (renderModel per block and render type), with no face culling. Large schematics drop the frame rate while the planner is open.
Scope
- When a schematic is loaded, build its block geometry once per render type into cached buffers on the render thread.
SuperByteBufferfollows the pattern ofGhostSchematicRenderer. - Skip faces hidden by a neighbour block, the way world rendering does.
- Each frame, only draw the cached buffers with the camera transform.
- Block entity renderers (belts, shafts) stay per frame, but are limited to
maxGhostBlockEntitieslike the ghost preview. - Free the buffers when the schematic leaves the cache.
Acceptance
- A 64×64×64 schematic keeps a playable frame rate in the planner.
- Create blocks (belts, shafts, casings) look the same as before.
- No GPU memory growth after browsing through many schematics.
Depends on: the off-thread loading ticket.