com.io7m.jcanephora.core.api

## Interface JCGLIndexBuffersType

-     public interface JCGLIndexBuffersType

  The interface to OpenGL index buffers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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()`
    `void` | `indexBufferUnbind()` Unbind the current index buffer.
    `void` | `indexBufferUpdate(JCGLBufferUpdateType<JCGLIndexBufferType> u)` Perform the index buffer update `u`.

- - ### Method Detail

    - #### indexBufferAllocate

          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`.

      The index buffer is bound to the current array object.

      Parameters:
        `indices` - The number of indices
        `type` - The type of indices
        `usage` - The usage hint
      Returns:
        An index buffer
      See Also:
        `JCGLArrayObjectsType`

    - #### indexBufferGetCurrentlyBound

          Optional<JCGLIndexBufferUsableType> indexBufferGetCurrentlyBound()
                                                                    throws JCGLException

      Returns:
        The currently bound index buffer, if one exists
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### indexBufferBind

          void indexBufferBind(JCGLIndexBufferUsableType a)
                        throws JCGLException,
                               JCGLExceptionDeleted

      Bind the given index buffer.
      Parameters:
        `a` - The index buffer
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionDeleted` - Iff the given index buffer has already been deleted

    - #### indexBufferUnbind

          void indexBufferUnbind()
                          throws JCGLException

      Unbind the current index buffer. If no buffer is bound, this call has no effect.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### indexBufferDelete

          void indexBufferDelete(JCGLIndexBufferType a)
                          throws JCGLException,
                                 JCGLExceptionDeleted

      Deletes the buffer referenced by `a`.

      Calling this method will unbind `a` iff it is bound.

      Parameters:
        `a` - The index buffer
      Throws:
        `JCGLExceptionDeleted` - If the index is already deleted
        `JCGLException` - Iff an OpenGL error occurs

    - #### indexBufferUpdate

          void indexBufferUpdate(JCGLBufferUpdateType<JCGLIndexBufferType> u)
                          throws JCGLException,
                                 JCGLExceptionDeleted,
                                 JCGLExceptionBufferNotBound

      Perform the index buffer update `u`.

      Parameters:
        `u` - The update
      Throws:
        `JCGLException` - Iff an OpenGL error occurs
        `JCGLExceptionDeleted` - If the index buffer has already been deleted
        `JCGLExceptionBufferNotBound` - If the index buffer in `u` is not bound

    - #### indexBufferIsBound

          boolean indexBufferIsBound()

      Returns:
        `true` iff an index buffer is currently bound

Copyright © 2016 <code@io7m.com> http://io7m.com