Package com.mojang.blaze3d.vertex
Class BufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.DefaultedVertexConsumer
com.mojang.blaze3d.vertex.BufferBuilder
- All Implemented Interfaces:
BufferVertexConsumer
,VertexConsumer
,IForgeVertexConsumer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate ByteBuffer
private boolean
private VertexFormatElement
private List<BufferBuilder.DrawState>
private int
private boolean
private VertexFormat
private boolean
private static int
private boolean
private int
private static org.apache.logging.log4j.Logger
private VertexFormat.Mode
private int
private Vector3f[]
private float
private float
private float
private int
private int
private int
Fields inherited from class com.mojang.blaze3d.vertex.DefaultedVertexConsumer
defaultA, defaultB, defaultColorSet, defaultG, defaultR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin(VertexFormat.Mode p_166780_, VertexFormat p_166781_)
boolean
building()
void
clear()
color(int p_85692_, int p_85693_, int p_85694_, int p_85695_)
void
discard()
void
end()
void
private void
ensureCapacity(int p_85723_)
private void
private it.unimi.dsi.fastutil.ints.IntConsumer
intConsumer(VertexFormat.IndexType p_166778_)
private Vector3f[]
void
com.mojang.datafixers.util.Pair<BufferBuilder.DrawState,ByteBuffer>
void
putBulkData(ByteBuffer buffer)
void
putByte(int p_85686_, byte p_85687_)
void
putFloat(int p_85689_, float p_85690_)
void
putShort(int p_85700_, short p_85701_)
private void
putSortedQuadIndices(VertexFormat.IndexType p_166787_)
void
restoreSortState(BufferBuilder.SortState p_166776_)
private static int
roundUp(int p_85726_)
void
setQuadSortOrigin(float p_166772_, float p_166773_, float p_166774_)
private void
switchFormat(VertexFormat p_85705_)
void
vertex(float p_85671_, float p_85672_, float p_85673_, float p_85674_, float p_85675_, float p_85676_, float p_85677_, float p_85678_, float p_85679_, int p_85680_, int p_85681_, float p_85682_, float p_85683_, float p_85684_)
Methods inherited from class com.mojang.blaze3d.vertex.DefaultedVertexConsumer
defaultColor, unsetDefaultColor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.blaze3d.vertex.BufferVertexConsumer
normal, overlayCoords, uv, uv2, uvShort, vertex
Methods inherited from interface net.minecraftforge.client.extensions.IForgeVertexConsumer
applyBakedLighting, applyBakedNormals, putBulkData, putBulkData, putBulkData, putBulkData
Methods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer
color, defaultColor, normal, overlayCoords, putBulkData, putBulkData, unsetDefaultColor, uv2, vertex
-
Field Details
-
GROWTH_SIZE
private static final int GROWTH_SIZE- See Also:
- Constant Field Values
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
buffer
-
drawStates
-
lastPoppedStateIndex
private int lastPoppedStateIndex -
totalRenderedBytes
private int totalRenderedBytes -
nextElementByte
private int nextElementByte -
totalUploadedBytes
private int totalUploadedBytes -
vertices
private int vertices -
currentElement
-
elementIndex
private int elementIndex -
format
-
mode
-
fastFormat
private boolean fastFormat -
fullFormat
private boolean fullFormat -
building
private boolean building -
sortingPoints
-
sortX
private float sortX -
sortY
private float sortY -
sortZ
private float sortZ -
indexOnly
private boolean indexOnly
-
-
Constructor Details
-
BufferBuilder
public BufferBuilder(int p_85664_)
-
-
Method Details
-
ensureVertexCapacity
private void ensureVertexCapacity() -
ensureCapacity
private void ensureCapacity(int p_85723_) -
roundUp
private static int roundUp(int p_85726_) -
setQuadSortOrigin
public void setQuadSortOrigin(float p_166772_, float p_166773_, float p_166774_) -
getSortState
-
restoreSortState
-
begin
-
switchFormat
-
intConsumer
-
makeQuadSortingPoints
-
putSortedQuadIndices
-
end
public void end() -
putByte
public void putByte(int p_85686_, byte p_85687_)- Specified by:
putByte
in interfaceBufferVertexConsumer
-
putShort
public void putShort(int p_85700_, short p_85701_)- Specified by:
putShort
in interfaceBufferVertexConsumer
-
putFloat
public void putFloat(int p_85689_, float p_85690_)- Specified by:
putFloat
in interfaceBufferVertexConsumer
-
endVertex
public void endVertex()- Specified by:
endVertex
in interfaceVertexConsumer
-
nextElement
public void nextElement()- Specified by:
nextElement
in interfaceBufferVertexConsumer
-
color
- Specified by:
color
in interfaceBufferVertexConsumer
- Specified by:
color
in interfaceVertexConsumer
-
vertex
public void vertex(float p_85671_, float p_85672_, float p_85673_, float p_85674_, float p_85675_, float p_85676_, float p_85677_, float p_85678_, float p_85679_, int p_85680_, int p_85681_, float p_85682_, float p_85683_, float p_85684_)- Specified by:
vertex
in interfaceVertexConsumer
-
popNextBuffer
-
clear
public void clear() -
discard
public void discard() -
currentElement
- Specified by:
currentElement
in interfaceBufferVertexConsumer
-
building
public boolean building() -
putBulkData
-
getVertexFormat
-