@Environment(value=CLIENT) public class VertexBuffer extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private VertexFormat |
format |
private int |
id |
private int |
vertexCount |
Constructor and Description |
---|
VertexBuffer(VertexFormat format) |
Modifier and Type | Method and Description |
---|---|
void |
bind() |
void |
close() |
void |
draw(Matrix4f matrix,
int mode) |
CompletableFuture<Void> |
submitUpload(BufferBuilder buffer) |
static void |
unbind() |
void |
upload(BufferBuilder buffer) |
private void |
uploadInternal(BufferBuilder buffer) |
private int id
private final VertexFormat format
private int vertexCount
public VertexBuffer(VertexFormat format)
public void bind()
public void upload(BufferBuilder buffer)
public CompletableFuture<Void> submitUpload(BufferBuilder buffer)
private void uploadInternal(BufferBuilder buffer)
public void draw(Matrix4f matrix, int mode)
public static void unbind()
public void close()
close
in interface AutoCloseable