Package com.mojang.blaze3d.vertex
Class VertexFormat
java.lang.Object
com.mojang.blaze3d.vertex.VertexFormat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<VertexFormatElement> private final intprivate GpuBufferprivate GpuBufferprivate final int[]static final intprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionVertexFormat(List<VertexFormatElement> pElements, List<String> pNames, it.unimi.dsi.fastutil.ints.IntList pOffsets, int pVertexSize) -
Method Summary
Modifier and TypeMethodDescriptionstatic VertexFormat.Builderbuilder()booleancontains(VertexFormatElement pElement) booleangetElementName(VertexFormatElement pElement) intintgetOffset(VertexFormatElement pElement) int[]intbooleanhasColor()inthashCode()booleanbooleanbooleanhasUV(int which) toString()uploadImmediateIndexBuffer(ByteBuffer pBuffer) uploadImmediateVertexBuffer(ByteBuffer pBuffer) private static GpuBufferuploadToBuffer(GpuBuffer pBuffer, ByteBuffer pData, int pUsage, Supplier<String> pLabel)
-
Field Details
-
UNKNOWN_ELEMENT
public static final int UNKNOWN_ELEMENT- See Also:
-
elements
-
names
-
vertexSize
private final int vertexSize -
elementsMask
private final int elementsMask -
offsetsByElement
private final int[] offsetsByElement -
immediateDrawVertexBuffer
-
immediateDrawIndexBuffer
-
-
Constructor Details
-
VertexFormat
VertexFormat(List<VertexFormatElement> pElements, List<String> pNames, it.unimi.dsi.fastutil.ints.IntList pOffsets, int pVertexSize)
-
-
Method Details
-
builder
-
toString
-
getVertexSize
public int getVertexSize() -
getElements
-
getElementAttributeNames
-
getOffsetsByElement
public int[] getOffsetsByElement() -
getOffset
-
contains
-
getElementsMask
public int getElementsMask() -
getElementName
-
equals
-
hashCode
public int hashCode() -
uploadToBuffer
private static GpuBuffer uploadToBuffer(@Nullable GpuBuffer pBuffer, ByteBuffer pData, int pUsage, Supplier<String> pLabel) -
uploadImmediateVertexBuffer
-
uploadImmediateIndexBuffer
-
getElementMapping
-
hasPosition
public boolean hasPosition() -
hasNormal
public boolean hasNormal() -
hasColor
public boolean hasColor() -
hasUV
public boolean hasUV(int which)
-