com.jogamp.opengl

## Class FBObject.RenderAttachment

- java.lang.Object
- - com.jogamp.opengl.FBObject.Attachment
  - - com.jogamp.opengl.FBObject.RenderAttachment

- Direct Known Subclasses:
    FBObject.ColorAttachment
  Enclosing class:
    FBObject

      public static class FBObject.RenderAttachment
      extends FBObject.Attachment

  Other renderbuffer attachment which maybe a colorbuffer, depth or stencil.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.jogamp.opengl.FBObject.Attachment

      `FBObject.Attachment.Type`

  - ### Field Summary

    - ### Fields inherited from class com.jogamp.opengl.FBObject.Attachment

      `format, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FBObject.RenderAttachment(FBObject.Attachment.Type type, int iFormat, int samples, int width, int height, int name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)` Comparison by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `samples`, `FBObject.width`, `FBObject.height` and `FBObject.Attachment.name`.
    `void` | `free(GL gl)` Releases the attachment if initialized, i.e.
    `int` | `getSamples()` number of samples, or zero for no multisampling
    `int` | `hashCode()` Hashed by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `samples`, `FBObject.width`, `FBObject.height` and `FBObject.Attachment.name`.
    `boolean` | `initialize(GL gl)` Initializes the attachment and set it's parameter, if uninitialized, i.e.
    `String` | `toString()`

    - ### Methods inherited from class com.jogamp.opengl.FBObject.Attachment

      `formatToGLCapabilities, getFormat, getHeight, getName, getType, getWidth`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FBObject.RenderAttachment

          public FBObject.RenderAttachment(FBObject.Attachment.Type type,
                                   int iFormat,
                                   int samples,
                                   int width,
                                   int height,
                                   int name)

      Parameters:
        `type` - allowed types are `FBObject.Attachment.Type.DEPTH_STENCIL` `FBObject.Attachment.Type.DEPTH`, `FBObject.Attachment.Type.STENCIL` or `FBObject.Attachment.Type.COLOR`
        `iFormat` -
        `samples` -
        `width` -
        `height` -
        `name` -

  - ### Method Detail

    - #### getSamples

          public final int getSamples()

      number of samples, or zero for no multisampling

    - #### equals

          public boolean equals(Object o)

      Comparison by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `samples`, `FBObject.width`, `FBObject.height` and `FBObject.Attachment.name`.

      Comparison by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `FBObject.Attachment.width`, `FBObject.Attachment.height` and `FBObject.Attachment.name`.

      Overrides:
        `equals` in class `FBObject.Attachment`

    - #### hashCode

          public int hashCode()

      Hashed by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `samples`, `FBObject.width`, `FBObject.height` and `FBObject.Attachment.name`.

      Hashed by `FBObject.Attachment.type`, `FBObject.Attachment.format`, `FBObject.Attachment.width`, `FBObject.Attachment.height` and `FBObject.Attachment.name`.

      Overrides:
        `hashCode` in class `FBObject.Attachment`

    - #### initialize

          public boolean initialize(GL gl)
                             throws GLException

      Description copied from class: `FBObject.Attachment`
      Initializes the attachment and set it's parameter, if uninitialized, i.e. name is `zero`.

                      final boolean init = 0 == name;
                      if( init ) {
                          do init ..
                      }
                      return init;

      Specified by:
        `initialize` in class `FBObject.Attachment`
      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

          public void free(GL gl)

      Description copied from class: `FBObject.Attachment`
      Releases the attachment if initialized, i.e. name is not `zero`.

                      if(0 != name) {
                          do free ..
                          name = 0;
                      }

      Specified by:
        `free` in class `FBObject.Attachment`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `FBObject.Attachment`

Copyright 2010 JogAmp Community.