Package com.mojang.blaze3d.vertex
Class BufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.BufferBuilder
- All Implemented Interfaces:
VertexConsumer
,IVertexConsumerExtension
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferBuilder
private boolean
private int
private final boolean
private final VertexFormat
private final boolean
private final int
private static final boolean
private final VertexFormat.Mode
private static final long
private final int[]
private static final long
private long
private final int
private int
-
Constructor Summary
ConstructorsConstructorDescriptionBufferBuilder
(ByteBufferBuilder pBuffer, VertexFormat.Mode pMode, VertexFormat pFormat) -
Method Summary
Modifier and TypeMethodDescriptionaddVertex
(float p_350828_, float p_350614_, float p_350700_) void
addVertex
(float p_350423_, float p_350381_, float p_350383_, int p_350371_, float p_350977_, float p_350674_, int p_350816_, int p_350690_, float p_350640_, float p_350490_, float p_350810_) private long
beginElement
(VertexFormatElement pElement) private long
build()
private void
private void
private static byte
normalIntValue
(float pValue) private static void
putPackedUv
(long pPointer, int pPackedUv) private static void
putRgba
(long pPointer, int pColor) setColor
(int p_350530_) setColor
(int p_350581_, int p_350952_, int p_350275_, int p_350985_) setLight
(int p_350848_) setNormal
(float p_351000_, float p_350982_, float p_350974_) setOverlay
(int p_350297_) setUv
(float p_350574_, float p_350773_) setUv1
(int p_350396_, int p_350722_) setUv2
(int p_351058_, int p_350320_) private MeshData
private VertexConsumer
uvShort
(short pU, short pV, VertexFormatElement pElement) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.extensions.IVertexConsumerExtension
applyBakedLighting, applyBakedNormals, misc, putBulkData
Methods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer
addVertex, addVertex, addVertex, addVertex, putBulkData, putBulkData, setColor, setNormal, setNormal, setWhiteAlpha
-
Field Details
-
NOT_BUILDING
private static final long NOT_BUILDING- See Also:
-
UNKNOWN_ELEMENT
private static final long UNKNOWN_ELEMENT- See Also:
-
IS_LITTLE_ENDIAN
private static final boolean IS_LITTLE_ENDIAN -
buffer
-
vertexPointer
private long vertexPointer -
vertices
private int vertices -
format
-
mode
-
fastFormat
private final boolean fastFormat -
fullFormat
private final boolean fullFormat -
vertexSize
private final int vertexSize -
initialElementsToFill
private final int initialElementsToFill -
offsetsByElement
private final int[] offsetsByElement -
elementsToFill
private int elementsToFill -
building
private boolean building
-
-
Constructor Details
-
BufferBuilder
-
-
Method Details
-
build
-
buildOrThrow
-
ensureBuilding
private void ensureBuilding() -
storeMesh
-
beginVertex
private long beginVertex() -
beginElement
-
endLastVertex
private void endLastVertex() -
putRgba
private static void putRgba(long pPointer, int pColor) -
putPackedUv
private static void putPackedUv(long pPointer, int pPackedUv) -
addVertex
- Specified by:
addVertex
in interfaceVertexConsumer
-
setColor
- Specified by:
setColor
in interfaceVertexConsumer
-
setColor
- Specified by:
setColor
in interfaceVertexConsumer
-
setUv
- Specified by:
setUv
in interfaceVertexConsumer
-
setUv1
- Specified by:
setUv1
in interfaceVertexConsumer
-
setOverlay
- Specified by:
setOverlay
in interfaceVertexConsumer
-
setUv2
- Specified by:
setUv2
in interfaceVertexConsumer
-
setLight
- Specified by:
setLight
in interfaceVertexConsumer
-
uvShort
-
setNormal
- Specified by:
setNormal
in interfaceVertexConsumer
-
normalIntValue
private static byte normalIntValue(float pValue) -
addVertex
public void addVertex(float p_350423_, float p_350381_, float p_350383_, int p_350371_, float p_350977_, float p_350674_, int p_350816_, int p_350690_, float p_350640_, float p_350490_, float p_350810_) - Specified by:
addVertex
in interfaceVertexConsumer
-