com.jogamp.opengl

## Interface FBObject.Colorbuffer

- All Known Implementing Classes:
    FBObject.ColorAttachment, FBObject.TextureAttachment
  Enclosing class:
    FBObject

      public static interface FBObject.Colorbuffer

  Generic color buffer FBO attachment, either of type `FBObject.ColorAttachment` or `FBObject.TextureAttachment`.

  Always an instance of `FBObject.Attachment`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `formatToGLCapabilities(GLCapabilities caps, boolean rgba8Avail)` Writes the internal format to the given GLCapabilities object.
    `void` | `free(GL gl)` Releases the color buffer if initialized, i.e.
    `FBObject.ColorAttachment` | `getColorAttachment()` Casts this object to a `FBObject.ColorAttachment` reference, see `isTextureAttachment()`.
    `int` | `getFormat()` internal format of colorbuffer
    `int` | `getHeight()` height of colorbuffer
    `int` | `getName()` colorbuffer name [1..max]
    `FBObject.TextureAttachment` | `getTextureAttachment()` Casts this object to a `FBObject.TextureAttachment` reference, see `isTextureAttachment()`.
    `int` | `getWidth()` width of colorbuffer
    `boolean` | `initialize(GL gl)` Initializes the color buffer and set it's parameter, if uninitialized, i.e.
    `boolean` | `isTextureAttachment()` Returns `true` if instance is of type `FBObject.TextureAttachment` and `false` if instance is of type `FBObject.ColorAttachment`.

- - ### Method Detail

    - #### initialize

          boolean initialize(GL gl)
                             throws GLException

      Initializes the color buffer and set it's parameter, if uninitialized, i.e. name is `zero`.
      Returns:
        `true` if newly initialized, otherwise `false`.
      Throws:
        `GLException` - if buffer generation or setup fails. The just created buffer name will be deleted in this case.

    - #### free

          void free(GL gl)
                    throws GLException

      Releases the color buffer if initialized, i.e. name is not `zero`.
      Throws:
        `GLException` - if buffer release fails.

    - #### formatToGLCapabilities

          void formatToGLCapabilities(GLCapabilities caps,
                                    boolean rgba8Avail)

      Writes the internal format to the given GLCapabilities object.
      Parameters:
        `caps` - the destination for format bits
        `rgba8Avail` - whether rgba8 is available

    - #### isTextureAttachment

          boolean isTextureAttachment()

      Returns `true` if instance is of type `FBObject.TextureAttachment` and `false` if instance is of type `FBObject.ColorAttachment`.

    - #### getTextureAttachment

          FBObject.TextureAttachment getTextureAttachment()

      Casts this object to a `FBObject.TextureAttachment` reference, see `isTextureAttachment()`.
      Throws:
        `GLException` - if this object is not of type `FBObject.TextureAttachment`
      See Also:
        `isTextureAttachment()`

    - #### getColorAttachment

          FBObject.ColorAttachment getColorAttachment()

      Casts this object to a `FBObject.ColorAttachment` reference, see `isTextureAttachment()`.
      Throws:
        `GLException` - if this object is not of type `FBObject.ColorAttachment`
      See Also:
        `isTextureAttachment()`

    - #### getFormat

          int getFormat()

      internal format of colorbuffer

    - #### getWidth

          int getWidth()

      width of colorbuffer

    - #### getHeight

          int getHeight()

      height of colorbuffer

    - #### getName

          int getName()

      colorbuffer name [1..max]

Copyright 2010 JogAmp Community.