Interface VanillaInstancedMeshRenderer

All Known Implementing Classes:
InstancedStaticPartRenderer

public interface VanillaInstancedMeshRenderer
Contract for the vanilla VBO instanced renderer — the code path active when no external shader pack (Iris/Oculus) is loaded.

Implemented by InstancedStaticPartRenderer; logic may later move into a dedicated class without changing this API surface.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInstance(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 next flush(Matrix4f).
    void
    GL resource teardown (instance VBO, instance FloatBuffer, companion mesh).
    void
    Convenience entry that pulls the projection from RenderSystem.
    void
    flush(org.joml.Matrix4f projectionMatrix)
    Emit a single glDrawElementsInstanced for the accumulated batch using the projection matrix from the current render stage.
    int
     
    boolean
     
    void
    renderSingle(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 the isExternalShaderActive() 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 next flush(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 single glDrawElementsInstanced for the accumulated batch using the projection matrix from the current render stage.

      Source: InstancedStaticPartRenderer#flush() and InstancedStaticPartRenderer#flush(Matrix4f) (the dispatch entry-point), backed by InstancedStaticPartRenderer#flushBatchVanilla(Matrix4f) for the actual draw.

    • flush

      void flush()
      Convenience entry that pulls the projection from RenderSystem. 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().