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 renderType) voiddrawWithShader(Matrix4f frustumMatrix, Matrix4f projectionMatrix, CompiledShaderProgram shader) private VertexFormat.IndexTypebooleanstatic voidunbind()voidvoiduploadIndexBuffer(MeshData.DrawState drawState, ByteBuffer buffer) static VertexBufferuploadStatic(VertexFormat.Mode mode, VertexFormat format, Consumer<VertexConsumer> builder) private VertexFormatuploadVertexBuffer(MeshData.DrawState drawState, ByteBuffer buffer)
-
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 mode, VertexFormat format, Consumer<VertexConsumer> builder) -
upload
-
uploadIndexBuffer
-
uploadVertexBuffer
-
uploadIndexBuffer
@Nullable private RenderSystem.AutoStorageIndexBuffer uploadIndexBuffer(MeshData.DrawState drawState, @Nullable ByteBuffer buffer) -
bind
public void bind() -
unbind
public static void unbind() -
draw
public void draw() -
getIndexType
-
drawWithShader
public void drawWithShader(Matrix4f frustumMatrix, Matrix4f projectionMatrix, @Nullable CompiledShaderProgram shader) -
drawWithRenderType
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getFormat
-
isInvalid
public boolean isInvalid()
-