Interface BufferBuilderExtension
- All Known Implementing Classes:
BufferBuilderMixin
public interface BufferBuilderExtension
Duck interface used on
BufferBuilder to provide lower level access to the backing memory.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppends the remaining bytes from the given buffer to this BufferBuilder.voidFrees the internal ByteBuffer, if it exists.intvoidflywheel$injectForRender(ByteBuffer buffer, com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount) Prepares the BufferBuilder for drawing the contents of the given buffer.
-
Method Details
-
flywheel$getVertices
int flywheel$getVertices() -
flywheel$freeBuffer
void flywheel$freeBuffer()Frees the internal ByteBuffer, if it exists. -
flywheel$injectForRender
void flywheel$injectForRender(ByteBuffer buffer, com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount) Prepares the BufferBuilder for drawing the contents of the given buffer.- Parameters:
buffer- The buffer to draw.format- The format of the buffer.vertexCount- The number of vertices in the buffer.
-
flywheel$appendBufferUnsafe
Appends the remaining bytes from the given buffer to this BufferBuilder.- Parameters:
buffer- The buffer from which to copy bytes.- Throws:
IllegalStateException- If this BufferBuilder is not started or is the process of writing a vertexIllegalArgumentException- If the given buffer does not contain a whole number of vertices
-