类 BufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.DefaultedVertexConsumer
com.mojang.blaze3d.vertex.BufferBuilder
- 所有已实现的接口:
BufferVertexConsumer
,VertexConsumer
,IForgeVertexConsumer
-
嵌套类概要
嵌套类修饰符和类型类说明static final record
class
static class
-
字段概要
字段修饰符和类型字段说明private ByteBuffer
private boolean
private VertexFormatElement
private int
private boolean
private VertexFormat
private boolean
private static final int
private boolean
private static final org.slf4j.Logger
private VertexFormat.Mode
private int
private int
private int
private VertexSorting
private org.joml.Vector3f[]
private int
从类继承的字段 com.mojang.blaze3d.vertex.DefaultedVertexConsumer
defaultA, defaultB, defaultColorSet, defaultG, defaultR
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
begin
(VertexFormat.Mode pMode, VertexFormat pFormat) (专用程序包) ByteBuffer
bufferSlice
(int p_231170_, int p_231171_) boolean
building()
void
clear()
color
(int pRed, int pGreen, int pBlue, int pAlpha) void
discard()
end()
void
private void
ensureCapacity
(int pIncreaseAmount) private void
private void
private it.unimi.dsi.fastutil.ints.IntConsumer
intConsumer
(int p_231159_, VertexFormat.IndexType pIndexType) boolean
private org.joml.Vector3f[]
void
void
putBulkData
(ByteBuffer buffer) void
putByte
(int pIndex, byte pByteValue) void
putFloat
(int pIndex, float pFloatValue) void
putShort
(int pIndex, short pShortValue) private void
putSortedQuadIndices
(VertexFormat.IndexType pIndexType) (专用程序包) void
private void
reset()
void
restoreSortState
(BufferBuilder.SortState pSortState) private static int
roundUp
(int pX) void
setQuadSorting
(VertexSorting pQuadSorting) private BufferBuilder.RenderedBuffer
private void
switchFormat
(VertexFormat pFormat) void
vertex
(float pX, float pY, float pZ, float pRed, float pGreen, float pBlue, float pAlpha, float pTexU, float pTexV, int pOverlayUV, int pLightmapUV, float pNormalX, float pNormalY, float pNormalZ) 从类继承的方法 com.mojang.blaze3d.vertex.DefaultedVertexConsumer
defaultColor, unsetDefaultColor
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.mojang.blaze3d.vertex.BufferVertexConsumer
normal, overlayCoords, uv, uv2, uvShort, vertex
从接口继承的方法 net.minecraftforge.client.extensions.IForgeVertexConsumer
applyBakedLighting, applyBakedNormals, misc, putBulkData
从接口继承的方法 com.mojang.blaze3d.vertex.VertexConsumer
color, color, defaultColor, normal, overlayCoords, putBulkData, putBulkData, putBulkData, unsetDefaultColor, uv2, vertex
-
字段详细资料
-
GROWTH_SIZE
private static final int GROWTH_SIZE- 另请参阅:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
buffer
-
renderedBufferCount
private int renderedBufferCount -
renderedBufferPointer
private int renderedBufferPointer -
nextElementByte
private int nextElementByte -
vertices
private int vertices -
currentElement
-
elementIndex
private int elementIndex -
format
-
mode
-
fastFormat
private boolean fastFormat -
fullFormat
private boolean fullFormat -
building
private boolean building -
sortingPoints
@Nullable private org.joml.Vector3f[] sortingPoints -
sorting
-
indexOnly
private boolean indexOnly
-
-
构造器详细资料
-
BufferBuilder
public BufferBuilder(int pCapacity)
-
-
方法详细资料
-
ensureVertexCapacity
private void ensureVertexCapacity() -
ensureCapacity
private void ensureCapacity(int pIncreaseAmount) -
roundUp
private static int roundUp(int pX) -
setQuadSorting
-
getSortState
-
restoreSortState
-
begin
-
switchFormat
-
intConsumer
private it.unimi.dsi.fastutil.ints.IntConsumer intConsumer(int p_231159_, VertexFormat.IndexType pIndexType) -
makeQuadSortingPoints
private org.joml.Vector3f[] makeQuadSortingPoints() -
putSortedQuadIndices
-
isCurrentBatchEmpty
public boolean isCurrentBatchEmpty() -
endOrDiscardIfEmpty
-
end
-
ensureDrawing
private void ensureDrawing() -
storeRenderedBuffer
-
reset
private void reset() -
putByte
public void putByte(int pIndex, byte pByteValue) - 指定者:
putByte
在接口中BufferVertexConsumer
-
putShort
public void putShort(int pIndex, short pShortValue) - 指定者:
putShort
在接口中BufferVertexConsumer
-
putFloat
public void putFloat(int pIndex, float pFloatValue) - 指定者:
putFloat
在接口中BufferVertexConsumer
-
endVertex
public void endVertex()- 指定者:
endVertex
在接口中VertexConsumer
-
nextElement
public void nextElement()- 指定者:
nextElement
在接口中BufferVertexConsumer
-
color
- 指定者:
color
在接口中BufferVertexConsumer
- 指定者:
color
在接口中VertexConsumer
-
vertex
public void vertex(float pX, float pY, float pZ, float pRed, float pGreen, float pBlue, float pAlpha, float pTexU, float pTexV, int pOverlayUV, int pLightmapUV, float pNormalX, float pNormalY, float pNormalZ) - 指定者:
vertex
在接口中VertexConsumer
-
releaseRenderedBuffer
void releaseRenderedBuffer() -
clear
public void clear() -
discard
public void discard() -
currentElement
- 指定者:
currentElement
在接口中BufferVertexConsumer
-
building
public boolean building() -
bufferSlice
-
putBulkData
-