toMeshDraw

@JvmName(name = "create")
fun MeshData.toMeshDraw(pipeline: RenderPipeline, vboGetter: Function<VertexFormat, GrowableMappableRingBuffer> = sharedVboGetter, iboGetter: Function<VertexFormat.IndexType, GrowableMappableRingBuffer> = sharedIboGetter): MeshDraw

Sort Quads (If needed) and upload vertices and indices of MeshData to given GrowableMappableRingBuffer.

This might use shared index buffer from RenderSystem.getSequentialBuffer, if MeshData.indexBuffer returns null.

This function doesn't close the MeshData.

vboGetter/iboGetter decide the storage strategy: default shared getters are intended for dynamic per-frame meshes, while custom getters (e.g. from net.ccbluex.liquidbounce.render.StaticMeshStorage) allow static meshes to keep dedicated buffers.

Return

The uploaded data. The lifecycle is handled by backend buffer storage.