public interface JCGLIndexBuffersType
Modifier and Type | Method and Description |
---|---|
JCGLIndexBufferType |
indexBufferAllocate(long indices,
JCGLUnsignedType type,
JCGLUsageHint usage)
Allocate and bind an index buffer of
indices values of type
type , informing the implementation that the buffer will be used in
the manner specified by usage . |
void |
indexBufferBind(JCGLIndexBufferUsableType a)
Bind the given index buffer.
|
void |
indexBufferDelete(JCGLIndexBufferType a)
Deletes the buffer referenced by
a . |
Optional<JCGLIndexBufferUsableType> |
indexBufferGetCurrentlyBound() |
boolean |
indexBufferIsBound() |
ByteBuffer |
indexBufferRead(JCGLIndexBufferUsableType i,
JCGLByteBufferProducerType f) |
void |
indexBufferReallocate(JCGLIndexBufferUsableType i)
Reallocate the storage associated with the index buffer
i . |
void |
indexBufferUnbind()
Unbind the current index buffer.
|
void |
indexBufferUpdate(JCGLBufferUpdateType<JCGLIndexBufferType> u)
Perform the index buffer update
u . |
ByteBuffer indexBufferRead(JCGLIndexBufferUsableType i, JCGLByteBufferProducerType f) throws JCGLException, JCGLExceptionDeleted, JCGLExceptionBufferNotBound
i
- The index buffer that will be readf
- A function used to allocate the bufferJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- If the index buffer has already been
deletedJCGLExceptionBufferNotBound
- If the index buffer i
is not
boundJCGLIndexBufferType indexBufferAllocate(long indices, JCGLUnsignedType type, JCGLUsageHint usage)
Allocate and bind an index buffer of indices
values of type
type
, informing the implementation that the buffer will be used in
the manner specified by usage
.
The index buffer is bound to the current array object.
indices
- The number of indicestype
- The type of indicesusage
- The usage hintJCGLArrayObjectsType
void indexBufferReallocate(JCGLIndexBufferUsableType i) throws JCGLException, JCGLExceptionDeleted, JCGLExceptionBufferNotBound
Reallocate the storage associated with the index buffer i
.
This is intended to facilitate streaming of buffer contents without incurring implicit synchronization by the OpenGL driver. The existing array buffer storage is "orphaned" and replaced by storage of the same size and with the same usage hint.
i
- The array bufferJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- If the index buffer has already been
deletedJCGLExceptionBufferNotBound
- If the index buffer i
is not
boundOptional<JCGLIndexBufferUsableType> indexBufferGetCurrentlyBound() throws JCGLException
JCGLException
- Iff an OpenGL error occursvoid indexBufferBind(JCGLIndexBufferUsableType a) throws JCGLException, JCGLExceptionDeleted
a
- The index bufferJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the given index buffer has already been
deletedvoid indexBufferUnbind() throws JCGLException
JCGLException
- Iff an OpenGL error occursvoid indexBufferDelete(JCGLIndexBufferType a) throws JCGLException, JCGLExceptionDeleted
Deletes the buffer referenced by a
.
Calling this method will unbind a
iff it is bound.
a
- The index bufferJCGLExceptionDeleted
- If the index is already deletedJCGLException
- Iff an OpenGL error occursvoid indexBufferUpdate(JCGLBufferUpdateType<JCGLIndexBufferType> u) throws JCGLException, JCGLExceptionDeleted, JCGLExceptionBufferNotBound
Perform the index buffer update u
.
u
- The updateJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- If the index buffer has already been
deletedJCGLExceptionBufferNotBound
- If the index buffer in u
is not
boundboolean indexBufferIsBound()
true
iff an index buffer is currently boundCopyright © 2017 <code@io7m.com> http://io7m.com