Class InstancedMaterial<D extends InstanceData>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.instancing.InstancedMaterial<D>
- Type Parameters:
D-
- All Implemented Interfaces:
Material<D>
A collection of Instancers that all have the same format.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<Object,GPUInstancer<D>> protected final List<GPUInstancer<D>> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
models
-
type
-
uninitialized
-
-
Constructor Details
-
InstancedMaterial
-
-
Method Details
-
model
Get 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 IModel that you want to render.- Returns:
- An instancer for the given model, capable of rendering many copies for little cost.
-
getAllInstancers
-
getInstanceCount
public int getInstanceCount() -
getVertexCount
public int getVertexCount() -
nothingToRender
public boolean nothingToRender() -
clear
public void clear()Clear all instance data without freeing resources. -
delete
public void delete()
-