Class BatchedMaterialGroup
java.lang.Object
com.jozufozu.flywheel.backend.instancing.batching.BatchedMaterialGroup
- All Implemented Interfaces:
MaterialGroup
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddelete()intGet the number of instances drawn last frame.intGet the number of vertices drawn last frame.<D extends InstanceData>
BatchedMaterial<D>material(StructType<D> type) Get the material as defined by the giventype.voidrender(com.mojang.blaze3d.vertex.PoseStack stack, BatchDrawingTracker source, TaskEngine pool)
-
Field Details
-
state
protected final net.minecraft.client.renderer.RenderType state
-
-
Constructor Details
-
BatchedMaterialGroup
public BatchedMaterialGroup(net.minecraft.client.renderer.RenderType state)
-
-
Method Details
-
material
Description copied from interface:MaterialGroupGet the material as defined by the giventype.- Specified by:
materialin interfaceMaterialGroup- 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.
-
render
public void render(com.mojang.blaze3d.vertex.PoseStack stack, BatchDrawingTracker source, TaskEngine pool) -
clear
public void clear() -
delete
public void delete() -
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.
-