Package com.mojang.blaze3d.vertex
Class BufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.DefaultedVertexConsumer
com.mojang.blaze3d.vertex.BufferBuilder
- All Implemented Interfaces:
- BufferVertexConsumer,- VertexConsumer,- IForgeVertexConsumer
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordclassstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate booleanprivate VertexFormatElementprivate intprivate booleanprivate VertexFormatprivate booleanprivate static final intprivate booleanprivate static final org.slf4j.Loggerprivate VertexFormat.Modeprivate intprivate intprivate intprivate VertexSortingprivate org.joml.Vector3f[]private intFields inherited from class com.mojang.blaze3d.vertex.DefaultedVertexConsumerdefaultA, defaultB, defaultColorSet, defaultG, defaultR
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbegin(VertexFormat.Mode p_166780_, VertexFormat p_166781_) (package private) ByteBufferbufferSlice(int p_231170_, int p_231171_) booleanbuilding()voidclear()color(int p_85692_, int p_85693_, int p_85694_, int p_85695_) voiddiscard()end()voidprivate voidensureCapacity(int p_85723_) private voidprivate voidprivate it.unimi.dsi.fastutil.ints.IntConsumerintConsumer(int p_231159_, VertexFormat.IndexType p_231160_) booleanprivate org.joml.Vector3f[]voidvoidputBulkData(ByteBuffer buffer) voidputByte(int p_85686_, byte p_85687_) voidputFloat(int p_85689_, float p_85690_) voidputShort(int p_85700_, short p_85701_) private voidputSortedQuadIndices(VertexFormat.IndexType p_166787_) (package private) voidprivate voidreset()voidrestoreSortState(BufferBuilder.SortState p_166776_) private static introundUp(int p_85726_) voidsetQuadSorting(VertexSorting p_277454_) private BufferBuilder.RenderedBufferprivate voidswitchFormat(VertexFormat p_85705_) voidvertex(float p_85671_, float p_85672_, float p_85673_, float p_85674_, float p_85675_, float p_85676_, float p_85677_, float p_85678_, float p_85679_, int p_85680_, int p_85681_, float p_85682_, float p_85683_, float p_85684_) Methods inherited from class com.mojang.blaze3d.vertex.DefaultedVertexConsumerdefaultColor, unsetDefaultColorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.blaze3d.vertex.BufferVertexConsumernormal, overlayCoords, uv, uv2, uvShort, vertexMethods inherited from interface net.minecraftforge.client.extensions.IForgeVertexConsumerapplyBakedLighting, applyBakedNormals, misc, putBulkDataMethods inherited from interface com.mojang.blaze3d.vertex.VertexConsumercolor, color, defaultColor, normal, overlayCoords, putBulkData, putBulkData, putBulkData, unsetDefaultColor, uv2, vertex
- 
Field Details- 
GROWTH_SIZEprivate static final int GROWTH_SIZE- See Also:
 
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
buffer
- 
renderedBufferCountprivate int renderedBufferCount
- 
renderedBufferPointerprivate int renderedBufferPointer
- 
nextElementByteprivate int nextElementByte
- 
verticesprivate int vertices
- 
currentElement
- 
elementIndexprivate int elementIndex
- 
format
- 
mode
- 
fastFormatprivate boolean fastFormat
- 
fullFormatprivate boolean fullFormat
- 
buildingprivate boolean building
- 
sortingPoints@Nullable private org.joml.Vector3f[] sortingPoints
- 
sorting
- 
indexOnlyprivate boolean indexOnly
 
- 
- 
Constructor Details- 
BufferBuilderpublic BufferBuilder(int p_85664_) 
 
- 
- 
Method Details- 
ensureVertexCapacityprivate void ensureVertexCapacity()
- 
ensureCapacityprivate void ensureCapacity(int p_85723_) 
- 
roundUpprivate static int roundUp(int p_85726_) 
- 
setQuadSorting
- 
getSortState
- 
restoreSortState
- 
begin
- 
switchFormat
- 
intConsumerprivate it.unimi.dsi.fastutil.ints.IntConsumer intConsumer(int p_231159_, VertexFormat.IndexType p_231160_) 
- 
makeQuadSortingPointsprivate org.joml.Vector3f[] makeQuadSortingPoints()
- 
putSortedQuadIndices
- 
isCurrentBatchEmptypublic boolean isCurrentBatchEmpty()
- 
endOrDiscardIfEmpty
- 
end
- 
ensureDrawingprivate void ensureDrawing()
- 
storeRenderedBuffer
- 
resetprivate void reset()
- 
putBytepublic void putByte(int p_85686_, byte p_85687_) - Specified by:
- putBytein interface- BufferVertexConsumer
 
- 
putShortpublic void putShort(int p_85700_, short p_85701_) - Specified by:
- putShortin interface- BufferVertexConsumer
 
- 
putFloatpublic void putFloat(int p_85689_, float p_85690_) - Specified by:
- putFloatin interface- BufferVertexConsumer
 
- 
endVertexpublic void endVertex()- Specified by:
- endVertexin interface- VertexConsumer
 
- 
nextElementpublic void nextElement()- Specified by:
- nextElementin interface- BufferVertexConsumer
 
- 
color- Specified by:
- colorin interface- BufferVertexConsumer
- Specified by:
- colorin interface- VertexConsumer
 
- 
vertexpublic void vertex(float p_85671_, float p_85672_, float p_85673_, float p_85674_, float p_85675_, float p_85676_, float p_85677_, float p_85678_, float p_85679_, int p_85680_, int p_85681_, float p_85682_, float p_85683_, float p_85684_) - Specified by:
- vertexin interface- VertexConsumer
 
- 
releaseRenderedBuffervoid releaseRenderedBuffer()
- 
clearpublic void clear()
- 
discardpublic void discard()
- 
currentElement- Specified by:
- currentElementin interface- BufferVertexConsumer
 
- 
buildingpublic boolean building()
- 
bufferSlice
- 
putBulkData
 
-