com.io7m.jcanephora.core.api

## Interface JCGLArrayBuffersType

-     public interface JCGLArrayBuffersType

  The interface to OpenGL array buffers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLArrayBufferType` | `arrayBufferAllocate(long size, JCGLUsageHint usage)` Allocate and bind an array buffer of `size` bytes, informing the implementation that the buffer will be used in the manner specified by `usage`.
    `boolean` | `arrayBufferAnyIsBound()`
    `void` | `arrayBufferBind(JCGLArrayBufferUsableType a)` Bind the given array buffer.
    `void` | `arrayBufferDelete(JCGLArrayBufferType a)` Deletes the buffer referenced by `a`.
    `Optional<JCGLArrayBufferUsableType>` | `arrayBufferGetCurrentlyBound()`
    `boolean` | `arrayBufferIsBound(JCGLArrayBufferUsableType a)`
    `void` | `arrayBufferUnbind()` Unbind the current array buffer.
    `void` | `arrayBufferUpdate(JCGLBufferUpdateType<JCGLArrayBufferType> u)` Perform the array buffer update `u`.

- - ### Method Detail

    - #### arrayBufferAllocate

          JCGLArrayBufferType arrayBufferAllocate(long size,
                                                  JCGLUsageHint usage)
                                           throws JCGLException

      Allocate and bind an array buffer of `size` bytes, informing the implementation that the buffer will be used in the manner specified by `usage`.

      Calling this method will unbind any currently bound array buffer.

      Parameters:
        `size` - The size in bytes of the array buffer
        `usage` - The usage hint
      Returns:
        A reference to the allocated buffer.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.

    - #### arrayBufferGetCurrentlyBound

          Optional<JCGLArrayBufferUsableType> arrayBufferGetCurrentlyBound()
                                                                    throws JCGLException

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

    - #### arrayBufferAnyIsBound

          boolean arrayBufferAnyIsBound()
                                 throws JCGLException

      Returns:
        `true` iff any array buffer is bound
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### arrayBufferIsBound

          boolean arrayBufferIsBound(JCGLArrayBufferUsableType a)
                              throws JCGLException

      Parameters:
        `a` - The array buffer
      Returns:
        `true` iff the given array buffer is bound
      Throws:
        `JCGLException` - Iff an OpenGL error occurs

    - #### arrayBufferBind

          void arrayBufferBind(JCGLArrayBufferUsableType a)
                        throws JCGLException,
                               JCGLExceptionDeleted

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

    - #### arrayBufferUnbind

          void arrayBufferUnbind()
                          throws JCGLException

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

    - #### arrayBufferDelete

          void arrayBufferDelete(JCGLArrayBufferType a)
                          throws JCGLException,
                                 JCGLExceptionDeleted

      Deletes the buffer referenced by `a`.

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

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

    - #### arrayBufferUpdate

          void arrayBufferUpdate(JCGLBufferUpdateType<JCGLArrayBufferType> u)
                          throws JCGLException,
                                 JCGLExceptionDeleted,
                                 JCGLExceptionBufferNotBound

      Perform the array buffer update `u`.

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

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