com.io7m.jcanephora.core.api

## Interface JCGLFramebuffersType

-     public interface JCGLFramebuffersType

  The interface to OpenGL framebuffer objects.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLFramebufferType` | `framebufferAllocate(JCGLFramebufferBuilderType b)` Allocate and bind a framebuffer object based on the values given in `b`.
    `void` | `framebufferBlit(com.io7m.jareas.core.AreaInclusiveUnsignedLType source, com.io7m.jareas.core.AreaInclusiveUnsignedLType target, Set<JCGLFramebufferBlitBuffer> buffers, JCGLFramebufferBlitFilter filter)` Copy a region of the current read framebuffer to the current draw framebuffer.
    `void` | `framebufferDelete(JCGLFramebufferType f)` Delete the given framebuffer.
    `boolean` | `framebufferDrawAnyIsBound()`
    `void` | `framebufferDrawBind(JCGLFramebufferUsableType framebuffer)` Bind the given framebuffer `framebuffer` to the draw target.
    `Optional<JCGLFramebufferUsableType>` | `framebufferDrawGetBound()`
    `boolean` | `framebufferDrawIsBound(JCGLFramebufferUsableType framebuffer)`
    `void` | `framebufferDrawUnbind()` Unbind the current framebuffer from the draw target.
    `JCGLFramebufferStatus` | `framebufferDrawValidate()` Determine the validity of the currently bound draw framebuffer.
    `List<JCGLFramebufferColorAttachmentPointType>` | `framebufferGetColorAttachments()`
    `List<JCGLFramebufferDrawBufferType>` | `framebufferGetDrawBuffers()`
    `JCGLFramebufferBuilderType` | `framebufferNewBuilder()` Retrieve a new framebuffer object builder.
    `boolean` | `framebufferReadAnyIsBound()`
    `void` | `framebufferReadBind(JCGLFramebufferUsableType framebuffer)` Bind the given framebuffer `framebuffer` to the read target.
    `Optional<JCGLFramebufferUsableType>` | `framebufferReadGetBound()`
    `boolean` | `framebufferReadIsBound(JCGLFramebufferUsableType framebuffer)`
    `void` | `framebufferReadUnbind()` Unbind the current framebuffer from the read target.
    `JCGLFramebufferStatus` | `framebufferReadValidate()` Determine the validity of the currently bound read framebuffer.

- - ### Method Detail

    - #### framebufferNewBuilder

          JCGLFramebufferBuilderType framebufferNewBuilder()
                                                    throws JCGLException

      Retrieve a new framebuffer object builder. The returned builder can be used indefinitely but is tied to the `JCGLContextType` upon which it was created.
      Returns:
        A new framebuffer object builder
      Throws:
        `JCGLException` - On OpenGL errors

    - #### framebufferAllocate

          JCGLFramebufferType framebufferAllocate(JCGLFramebufferBuilderType b)
                                           throws JCGLException

      Allocate and bind a framebuffer object based on the values given in `b`.

      Calling this method will unbind any currently bound draw framebuffer. The resulting framebuffer, if any, will remain bound when the method returns.

      Parameters:
        `b` - The framebuffer object builder
      Returns:
        A new framebuffer object
      Throws:
        `JCGLException` - On OpenGL errors

    - #### framebufferDelete

          void framebufferDelete(JCGLFramebufferType f)
                          throws JCGLException

      Delete the given framebuffer. The attachments are not deleted.
      Parameters:
        `f` - The framebuffer
      Throws:
        `JCGLException` - On OpenGL errors

    - #### framebufferDrawAnyIsBound

          boolean framebufferDrawAnyIsBound()
                                     throws JCGLException

      Returns:
        `true` iff any application-created draw framebuffer is currently bound.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferDrawBind

          void framebufferDrawBind(JCGLFramebufferUsableType framebuffer)
                            throws JCGLException

      Bind the given framebuffer `framebuffer` to the draw target.
      Parameters:
        `framebuffer` - The framebuffer.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferDrawGetBound

          Optional<JCGLFramebufferUsableType> framebufferDrawGetBound()
                                                               throws JCGLException

      Returns:
        `Some(framebuffer)` iff any application-created draw framebuffer is currently bound.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferDrawIsBound

          boolean framebufferDrawIsBound(JCGLFramebufferUsableType framebuffer)
                                  throws JCGLException

      Parameters:
        `framebuffer` - The framebuffer.
      Returns:
        `true` iff `framebuffer` is currently bound to the draw target.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferDrawUnbind

          void framebufferDrawUnbind()
                              throws JCGLException

      Unbind the current framebuffer from the draw target.

      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferDrawValidate

          JCGLFramebufferStatus framebufferDrawValidate()
                                                 throws JCGLException

      Determine the validity of the currently bound draw framebuffer.

      Returns:
        The status of the framebuffer.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferGetDrawBuffers

          List<JCGLFramebufferDrawBufferType> framebufferGetDrawBuffers()
                                                                 throws JCGLException

      Returns:
        The available set of draw buffers.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferGetColorAttachments

          List<JCGLFramebufferColorAttachmentPointType> framebufferGetColorAttachments()
                                                                                throws JCGLException

      Returns:
        The available set of color attachment points.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadAnyIsBound

          boolean framebufferReadAnyIsBound()
                                     throws JCGLException

      Returns:
        `true` iff any application-created read framebuffer is currently bound.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadBind

          void framebufferReadBind(JCGLFramebufferUsableType framebuffer)
                            throws JCGLException

      Bind the given framebuffer `framebuffer` to the read target.
      Parameters:
        `framebuffer` - The framebuffer.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadGetBound

          Optional<JCGLFramebufferUsableType> framebufferReadGetBound()
                                                               throws JCGLException

      Returns:
        `Some(framebuffer)` iff any application-created read framebuffer is currently bound.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadValidate

          JCGLFramebufferStatus framebufferReadValidate()
                                                 throws JCGLException

      Determine the validity of the currently bound read framebuffer.

      Returns:
        The status of the framebuffer.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadIsBound

          boolean framebufferReadIsBound(JCGLFramebufferUsableType framebuffer)
                                  throws JCGLException

      Parameters:
        `framebuffer` - The framebuffer.
      Returns:
        `true` iff `framebuffer` is currently bound to the read target.
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferReadUnbind

          void framebufferReadUnbind()
                              throws JCGLException

      Unbind the current framebuffer from the read target.

      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

    - #### framebufferBlit

          void framebufferBlit(com.io7m.jareas.core.AreaInclusiveUnsignedLType source,
                               com.io7m.jareas.core.AreaInclusiveUnsignedLType target,
                               Set<JCGLFramebufferBlitBuffer> buffers,
                               JCGLFramebufferBlitFilter filter)
                        throws JCGLException

      Copy a region of the current read framebuffer to the current draw framebuffer.
      Parameters:
        `source` - The area of the read framebuffer from which to copy.
        `target` - The area of the draw framebuffer to which to copy.
        `buffers` - The set of buffers that should be copied.
        `filter` - The filter used when stretching (if `source != target`).
      Throws:
        `JCGLException` - Iff an OpenGL exception occurs.

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