Class Buffer
java.lang.Object
dev.pfaff.altargui.render.Buffer
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Begins uploading to the buffer.void
close()
void
int
int
void
reset
(int capacity, int vao) toString()
void
upload
(Uploadable uploadable) void
uploadAt
(long offset, Uploadable uploadable)
-
Field Details
-
raw
-
instanceDef
-
-
Constructor Details
-
Buffer
-
-
Method Details
-
reset
public void reset(int capacity, int vao) - Parameters:
capacity
- the required capacity in instances.vao
- the shader of the VAO to bind if the buffer is recreated, or-1
if binding is not necessary.
-
beginUploading
public void beginUploading()Begins uploading to the buffer. Attempts to upload more thancapacity
might result in aBufferOverflowException
being thrown.The buffer's contents are undefined after this operation.
-
finishUploading
public void finishUploading() -
uploadAt
-
upload
-
instanceCount
public int instanceCount() -
instanceCapacity
public int instanceCapacity() -
toString
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-