com.jogamp.opengl

## Class FBObject.TextureAttachment

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

- All Implemented Interfaces:
    FBObject.Colorbuffer
  Enclosing class:
    FBObject

      public static class FBObject.TextureAttachment
      extends FBObject.Attachment
      implements FBObject.Colorbuffer

  Texture FBO attachment

- - ### Nested Class Summary

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

      `FBObject.Attachment.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `dataFormat` details of the texture setup
    `int` | `dataType` details of the texture setup
    `int` | `magFilter` details of the texture setup
    `int` | `minFilter` details of the texture setup
    `int` | `wrapS` details of the texture setup
    `int` | `wrapT` details of the texture setup

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

      `format, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FBObject.TextureAttachment(FBObject.Attachment.Type type, int iFormat, int width, int height, int dataFormat, int dataType, int magFilter, int minFilter, int wrapS, int wrapT, int name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `free(GL gl)` Releases the attachment if initialized, i.e.
    `FBObject.ColorAttachment` | `getColorAttachment()` Casts this object to a `FBObject.ColorAttachment` reference, see `FBObject.Colorbuffer.isTextureAttachment()`.
    `FBObject.TextureAttachment` | `getTextureAttachment()` Casts this object to a `FBObject.TextureAttachment` reference, see `FBObject.Colorbuffer.isTextureAttachment()`.
    `boolean` | `initialize(GL gl)` Initializes the texture 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`.
    `String` | `toString()`

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

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

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

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

    - ### Methods inherited from interface com.jogamp.opengl.FBObject.Colorbuffer

      `formatToGLCapabilities, getFormat, getHeight, getName, getWidth`

- - ### Field Detail

    - #### dataFormat

          public final int dataFormat

      details of the texture setup

    - #### dataType

          public final int dataType

      details of the texture setup

    - #### magFilter

          public final int magFilter

      details of the texture setup

    - #### minFilter

          public final int minFilter

      details of the texture setup

    - #### wrapS

          public final int wrapS

      details of the texture setup

    - #### wrapT

          public final int wrapT

      details of the texture setup

  - ### Constructor Detail

    - #### FBObject.TextureAttachment

          public FBObject.TextureAttachment(FBObject.Attachment.Type type,
                                    int iFormat,
                                    int width,
                                    int height,
                                    int dataFormat,
                                    int dataType,
                                    int magFilter,
                                    int minFilter,
                                    int wrapS,
                                    int wrapT,
                                    int name)

      Parameters:
        `type` - allowed types are [ `FBObject.Attachment.Type.COLOR_TEXTURE`, `FBObject.Attachment.Type.DEPTH_TEXTURE`, `FBObject.Attachment.Type.STENCIL_TEXTURE` ]
        `iFormat` -
        `width` -
        `height` -
        `dataFormat` -
        `dataType` -
        `magFilter` -
        `minFilter` -
        `wrapS` -
        `wrapT` -
        `name` -

  - ### Method Detail

    - #### initialize

          public boolean initialize(GL gl)
                             throws GLException

      Initializes the texture and set it's parameter, if uninitialized, i.e. name is `zero`.
      Specified by:
        `initialize` in interface `FBObject.Colorbuffer`
      Specified by:
        `initialize` in class `FBObject.Attachment`
      Returns:
        `true` if newly initialized, otherwise `false`.
      Throws:
        `GLException` - if texture generation and setup fails. The just created texture 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 interface `FBObject.Colorbuffer`
      Specified by:
        `free` in class `FBObject.Attachment`

    - #### isTextureAttachment

          public final boolean isTextureAttachment()

      Description copied from interface: `FBObject.Colorbuffer`
      Returns `true` if instance is of type `FBObject.TextureAttachment` and `false` if instance is of type `FBObject.ColorAttachment`.
      Specified by:
        `isTextureAttachment` in interface `FBObject.Colorbuffer`

    - #### getTextureAttachment

          public final FBObject.TextureAttachment getTextureAttachment()

      Description copied from interface: `FBObject.Colorbuffer`
      Casts this object to a `FBObject.TextureAttachment` reference, see `FBObject.Colorbuffer.isTextureAttachment()`.
      Specified by:
        `getTextureAttachment` in interface `FBObject.Colorbuffer`
      See Also:
        `FBObject.Colorbuffer.isTextureAttachment()`

    - #### getColorAttachment

          public final FBObject.ColorAttachment getColorAttachment()

      Description copied from interface: `FBObject.Colorbuffer`
      Casts this object to a `FBObject.ColorAttachment` reference, see `FBObject.Colorbuffer.isTextureAttachment()`.
      Specified by:
        `getColorAttachment` in interface `FBObject.Colorbuffer`
      See Also:
        `FBObject.Colorbuffer.isTextureAttachment()`

    - #### toString

          public String toString()

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

Copyright 2010 JogAmp Community.