Static Mesh Storage
class StaticMeshStorage
Storage for a reusable (static) mesh draw call.
Unlike the dynamic path that uploads per frame into shared buffers, this class keeps dedicated VBO/IBO storage and a cached MeshDraw so the same geometry can be rendered across multiple frames.
Functions
Link copied to clipboard
Draw the currently uploaded mesh if available.
Link copied to clipboard
Link copied to clipboard
inline fun StaticMeshStorage.buildMesh(pipeline: RenderPipeline, rotate: Boolean = true, origin: BlockPos = BlockPos.ZERO, block: VertexConsumer.(pose: PoseStack, origin: BlockPos) -> Unit)
Build new mesh data and upload it. This method is designed for lazy building so rotate defaults to true.
Link copied to clipboard
Link copied to clipboard
Clear the render state.
Link copied to clipboard
Resolve the mesh origin used for this build.
Link copied to clipboard
Upload mesh data into this storage's dedicated buffers and refresh the draw state.