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 ByteBufferBuilderprivate booleanprivate intprivate final booleanprivate final VertexFormatprivate final booleanprivate final intprivate static final booleanprivate final VertexFormat.Modeprivate static final longprivate final int[]private static final longprivate longprivate final intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionBufferBuilder(ByteBufferBuilder pBuffer, VertexFormat.Mode pMode, VertexFormat pFormat) -
Method Summary
Modifier and TypeMethodDescriptionaddVertex(float pX, float pY, float pZ) voidaddVertex(float pX, float pY, float pZ, int pColor, float pU, float pV, int pPackedOverlay, int pPackedLight, float pNormalX, float pNormalY, float pNormalZ) private longbeginElement(VertexFormatElement pElement) private longbuild()private voidprivate voidprivate static bytenormalIntValue(float pValue) private static voidputPackedUv(long pPointer, int pPackedUv) private static voidputRgba(long pPointer, int pColor) setColor(int pColor) setColor(int pRed, int pGreen, int pBlue, int pAlpha) setLight(int pPackedLight) setNormal(float pNormalX, float pNormalY, float pNormalZ) setOverlay(int pPackedOverlay) setUv(float pU, float pV) setUv1(int pU, int pV) setUv2(int pU, int pV) private MeshDataprivate VertexConsumeruvShort(short pU, short pV, VertexFormatElement pElement) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.IVertexConsumerExtension
applyBakedLighting, applyBakedNormals, misc, putBulkDataMethods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer
addVertex, addVertex, addVertex, addVertex, putBulkData, putBulkData, setColor, 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:
addVertexin interfaceVertexConsumer
-
setColor
- Specified by:
setColorin interfaceVertexConsumer
-
setColor
- Specified by:
setColorin interfaceVertexConsumer
-
setUv
- Specified by:
setUvin interfaceVertexConsumer
-
setUv1
- Specified by:
setUv1in interfaceVertexConsumer
-
setOverlay
- Specified by:
setOverlayin interfaceVertexConsumer
-
setUv2
- Specified by:
setUv2in interfaceVertexConsumer
-
setLight
- Specified by:
setLightin interfaceVertexConsumer
-
uvShort
-
setNormal
- Specified by:
setNormalin interfaceVertexConsumer
-
normalIntValue
private static byte normalIntValue(float pValue) -
addVertex
public void addVertex(float pX, float pY, float pZ, int pColor, float pU, float pV, int pPackedOverlay, int pPackedLight, float pNormalX, float pNormalY, float pNormalZ) - Specified by:
addVertexin interfaceVertexConsumer
-