Class BatchedMaterial<D extends InstanceData>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.batching.BatchedMaterial<D>
- All Implemented Interfaces:
Material<D>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all instance data without freeing resources.voiddelete()Get an instancer for the given model.voidsetupAndRenderInto(com.mojang.blaze3d.vertex.PoseStack stack, com.mojang.blaze3d.vertex.VertexConsumer buffer)
-
Field Details
-
models
-
-
Constructor Details
-
BatchedMaterial
-
-
Method Details
-
model
Description copied from interface:MaterialGet an instancer for the given model. Calling this method twice with the same key will return the same instancer.- Specified by:
modelin interfaceMaterial<D extends InstanceData>- Parameters:
key- An object that uniquely identifies the model.modelSupplier- A factory that creates the Model that you want to render. Each timeSupplier.get()is called, a new Model must be created.- Returns:
- An instancer for the given model, capable of rendering many copies for little cost.
-
setupAndRenderInto
public void setupAndRenderInto(com.mojang.blaze3d.vertex.PoseStack stack, com.mojang.blaze3d.vertex.VertexConsumer buffer) -
clear
public void clear()Clear all instance data without freeing resources. -
delete
public void delete()
-