Package com.mojang.blaze3d.vertex
Class BufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.BufferBuilder
- All Implemented Interfaces:
VertexConsumer,IForgeVertexConsumer
-
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 p_342927_, VertexFormat.Mode p_344709_, VertexFormat p_342329_) -
Method Summary
Modifier and TypeMethodDescriptionaddVertex(float p_342038_, float p_342902_, float p_344845_) voidaddVertex(float p_343280_, float p_344969_, float p_343237_, int p_342708_, float p_345023_, float p_344850_, int p_344316_, int p_342457_, float p_344002_, float p_344052_, float p_343783_) private longbeginElement(VertexFormatElement p_343872_) private longbuild()private voidprivate voidprivate static bytenormalIntValue(float p_344123_) private static voidputPackedUv(long p_344069_, int p_342894_) private static voidputRgba(long p_344481_, int p_342528_) setColor(int p_342265_) setColor(int p_345246_, int p_343163_, int p_342676_, int p_345202_) setLight(int p_342358_) setNormal(float p_342317_, float p_342276_, float p_342607_) setOverlay(int p_343250_) setUv(float p_344538_, float p_343862_) setUv1(int p_345138_, int p_344474_) setUv2(int p_343260_, int p_345129_) private MeshDataprivate VertexConsumeruvShort(short p_342039_, short p_345222_, VertexFormatElement p_344482_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.extensions.IForgeVertexConsumer
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
public BufferBuilder(ByteBufferBuilder p_342927_, VertexFormat.Mode p_344709_, VertexFormat p_342329_)
-
-
Method Details
-
build
-
buildOrThrow
-
ensureBuilding
private void ensureBuilding() -
storeMesh
-
beginVertex
private long beginVertex() -
beginElement
-
endLastVertex
private void endLastVertex() -
putRgba
private static void putRgba(long p_344481_, int p_342528_) -
putPackedUv
private static void putPackedUv(long p_344069_, int p_342894_) -
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 p_344123_) -
addVertex
public void addVertex(float p_343280_, float p_344969_, float p_343237_, int p_342708_, float p_345023_, float p_344850_, int p_344316_, int p_342457_, float p_344002_, float p_344052_, float p_343783_) - Specified by:
addVertexin interfaceVertexConsumer
-