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 static final intprivate final VertexFormat.Modeprivate static final longprivate final int[]private static final longprivate longprivate final intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionBufferBuilder(ByteBufferBuilder buffer, VertexFormat.Mode mode, VertexFormat format) -
Method Summary
Modifier and TypeMethodDescriptionaddVertex(float x, float y, float z) voidaddVertex(float x, float y, float z, int color, float u, float v, int overlayCoords, int lightCoords, float nx, float ny, float nz) private longbeginElement(VertexFormatElement element) private long@Nullable MeshDatabuild()private voidprivate voidprivate static bytenormalIntValue(float c) private static voidputPackedUv(long pointer, int packedUv) private static voidputRgba(long pointer, int argb) setColor(int color) setColor(int r, int g, int b, int a) setLight(int packedLightCoords) setLineWidth(float width) setNormal(float x, float y, float z) setOverlay(int packedOverlayCoords) setUv(float u, float v) setUv1(int u, int v) setUv2(int u, int v) private @Nullable MeshDataprivate VertexConsumeruvShort(short u, short v, VertexFormatElement element) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IVertexConsumerExtension
applyBakedNormals, misc, putBulkData, putBulkDataMethods inherited from interface VertexConsumer
addVertex, addVertex, addVertex, addVertex, addVertexWith2DPose, putBulkData, setColor, setNormal, setNormal
-
Field Details
-
MAX_VERTEX_COUNT
private static final int MAX_VERTEX_COUNT- See Also:
-
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 pointer, int argb) -
putPackedUv
private static void putPackedUv(long pointer, int packedUv) -
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
-
setLineWidth
- Specified by:
setLineWidthin interfaceVertexConsumer
-
normalIntValue
private static byte normalIntValue(float c) -
addVertex
public void addVertex(float x, float y, float z, int color, float u, float v, int overlayCoords, int lightCoords, float nx, float ny, float nz) - Specified by:
addVertexin interfaceVertexConsumer
-