Class InstancedMaterialGroup<P extends WorldProgram>

java.lang.Object
com.jozufozu.flywheel.backend.instancing.instancing.InstancedMaterialGroup<P>
All Implemented Interfaces:
MaterialGroup
Direct Known Subclasses:
CrumblingGroup

public class InstancedMaterialGroup<P extends WorldProgram> extends Object implements MaterialGroup
A group of materials all rendered with the same GL state. The children of a material group will all be rendered at the same time. No guarantees are made about the order of draw calls.
  • Field Details

  • Constructor Details

    • InstancedMaterialGroup

      public InstancedMaterialGroup(InstancingEngine<P> owner, net.minecraft.client.renderer.RenderType type)
  • Method Details

    • material

      public <D extends InstanceData> InstancedMaterial<D> material(StructType<D> type)
      Description copied from interface: MaterialGroup
      Get the material as defined by the given type.
      Specified by:
      material in interface MaterialGroup
      Type Parameters:
      D - The type representing the per instance data.
      Parameters:
      type - The material you want to create instances with.
      Returns:
      A material you can use to render models.
    • getInstanceCount

      public int getInstanceCount()
      Get the number of instances drawn last frame.
      Returns:
      The instance count.
    • getVertexCount

      public int getVertexCount()
      Get the number of vertices drawn last frame.
      Returns:
      The vertex count.
    • render

      public void render(com.mojang.math.Matrix4f viewProjection, double camX, double camY, double camZ, RenderLayer layer)
    • renderAll

      protected void renderAll(com.mojang.math.Matrix4f viewProjection, double camX, double camY, double camZ, RenderLayer layer)
    • setup

      protected void setup(P program)
    • clear

      public void clear()
    • delete

      public void delete()