Interface VanillaInstancedMeshRenderer
- All Known Implementing Classes:
InstancedStaticPartRenderer
Implemented by InstancedStaticPartRenderer; logic may later move
into a dedicated class without changing this API surface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstance(com.mojang.blaze3d.vertex.PoseStack poseStack, int packedLight, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.client.renderer.MultiBufferSource bufferSource) Enqueue one instance into the per-frame batch buffer for the nextflush(Matrix4f).voidcleanup()GL resource teardown (instance VBO, instance FloatBuffer, companion mesh).voidflush()Convenience entry that pulls the projection fromRenderSystem.voidflush(org.joml.Matrix4f projectionMatrix) Emit a singleglDrawElementsInstancedfor the accumulated batch using the projection matrix from the current render stage.intbooleanvoidrenderSingle(com.mojang.blaze3d.vertex.PoseStack poseStack, int packedLight, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.client.renderer.MultiBufferSource bufferSource) Single-machine immediate draw on the vanilla instanced shader path.
-
Method Details
-
renderSingle
void renderSingle(com.mojang.blaze3d.vertex.PoseStack poseStack, int packedLight, net.minecraft.core.BlockPos blockPos, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity, @Nullable net.minecraft.client.renderer.MultiBufferSource bufferSource) Single-machine immediate draw on the vanilla instanced shader path.Source:
InstancedStaticPartRenderer#renderSingle(PoseStack, int, BlockPos, BlockEntity, MultiBufferSource)— specifically the--- VANILLA VBO PATH ---branch after theisExternalShaderActive()early-out. -
addInstance
void addInstance(com.mojang.blaze3d.vertex.PoseStack poseStack, int packedLight, net.minecraft.core.BlockPos blockPos, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity, @Nullable net.minecraft.client.renderer.MultiBufferSource bufferSource) Enqueue one instance into the per-frame batch buffer for the nextflush(Matrix4f).Source:
InstancedStaticPartRenderer#addInstance(PoseStack, int, BlockPos, BlockEntity, MultiBufferSource)— the vanilla accumulation portion (everything below the Iris/shadow-pass early-outs, including the LightSampleCache 8/16-corner sampling and the float-buffer record write at the bottom). -
flush
void flush(org.joml.Matrix4f projectionMatrix) Emit a singleglDrawElementsInstancedfor the accumulated batch using the projection matrix from the current render stage.Source:
InstancedStaticPartRenderer#flush()andInstancedStaticPartRenderer#flush(Matrix4f)(the dispatch entry-point), backed byInstancedStaticPartRenderer#flushBatchVanilla(Matrix4f)for the actual draw. -
flush
void flush()Convenience entry that pulls the projection fromRenderSystem. Source:InstancedStaticPartRenderer#flush(). -
getInstanceCount
int getInstanceCount()- Returns:
- number of instances currently accumulated in the batch buffer.
Source:
InstancedStaticPartRenderer#getInstanceCount().
-
isInitialized
boolean isInitialized()- Returns:
- whether the underlying VAO/VBO/EBO triple was successfully
created and the renderer is ready to draw.
Source:
InstancedStaticPartRenderer#isInitialized().
-
cleanup
void cleanup()GL resource teardown (instance VBO, instance FloatBuffer, companion mesh). Source:InstancedStaticPartRenderer#cleanup().
-