Class InstancedMaterialGroup<P extends WorldProgram>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.instancing.InstancedMaterialGroup<P>
- All Implemented Interfaces:
MaterialGroup
- Direct Known Subclasses:
CrumblingGroup
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final InstancingEngine<P>protected final net.minecraft.client.renderer.RenderType -
Constructor Summary
ConstructorsConstructorDescriptionInstancedMaterialGroup(InstancingEngine<P> owner, net.minecraft.client.renderer.RenderType type) -
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>
InstancedMaterial<D>material(StructType<D> type) Get the material as defined by the giventype.voidrender(com.mojang.math.Matrix4f viewProjection, double camX, double camY, double camZ, RenderLayer layer) protected voidrenderAll(com.mojang.math.Matrix4f viewProjection, double camX, double camY, double camZ, RenderLayer layer) protected void
-
Field Details
-
owner
-
type
protected final net.minecraft.client.renderer.RenderType type
-
-
Constructor Details
-
InstancedMaterialGroup
public InstancedMaterialGroup(InstancingEngine<P> owner, net.minecraft.client.renderer.RenderType type)
-
-
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.
-
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
-
clear
public void clear() -
delete
public void delete()
-