Package com.mojang.blaze3d.vertex
Class VertexBuffer
java.lang.Object
com.mojang.blaze3d.vertex.VertexBuffer
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate VertexFormatprivate GpuBufferprivate intprivate VertexFormat.IndexTypeprivate VertexFormat.Modeprivate final BufferUsageprivate final GpuBuffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()voidclose()voiddraw()voiddrawWithRenderType(RenderType pRenderType) voiddrawWithShader(Matrix4f pFrustumMatrix, Matrix4f pProjectionMatrix, CompiledShaderProgram pShader) private VertexFormat.IndexTypebooleanstatic voidunbind()voidvoiduploadIndexBuffer(MeshData.DrawState pDrawState, ByteBuffer pBuffer) static VertexBufferuploadStatic(VertexFormat.Mode pMode, VertexFormat pFormat, Consumer<VertexConsumer> pBuilder) private VertexFormatuploadVertexBuffer(MeshData.DrawState pDrawState, ByteBuffer pBuffer)
-
Field Details
-
usage
-
vertexBuffer
-
indexBuffer
-
arrayObjectId
private int arrayObjectId -
format
-
sequentialIndices
-
indexType
-
indexCount
private int indexCount -
mode
-
-
Constructor Details
-
VertexBuffer
-
-
Method Details
-
uploadStatic
public static VertexBuffer uploadStatic(VertexFormat.Mode pMode, VertexFormat pFormat, Consumer<VertexConsumer> pBuilder) -
upload
-
uploadIndexBuffer
-
uploadVertexBuffer
private VertexFormat uploadVertexBuffer(MeshData.DrawState pDrawState, @Nullable ByteBuffer pBuffer) -
uploadIndexBuffer
@Nullable private RenderSystem.AutoStorageIndexBuffer uploadIndexBuffer(MeshData.DrawState pDrawState, @Nullable ByteBuffer pBuffer) -
bind
public void bind() -
unbind
public static void unbind() -
draw
public void draw() -
getIndexType
-
drawWithShader
public void drawWithShader(Matrix4f pFrustumMatrix, Matrix4f pProjectionMatrix, @Nullable CompiledShaderProgram pShader) -
drawWithRenderType
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getFormat
-
isInvalid
public boolean isInvalid()
-