com.jogamp.opengl.util

## Class GLPixelBuffer.GLPixelAttributes

- java.lang.Object
- - com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes

- Enclosing class:
    GLPixelBuffer

      public static class GLPixelBuffer.GLPixelAttributes
      extends Object

  Pixel attributes.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `bytesPerPixel` The OpenGL pixel size in bytes
    `int` | `componentCount` Pixel source component count, i.e.
    `int` | `format` The OpenGL pixel data format
    `int` | `type` The OpenGL pixel data type
    `static GLPixelBuffer.GLPixelAttributes` | `UNDEF` Undefined instance of `GLPixelBuffer.GLPixelAttributes`, having componentCount:=0, format:=0 and type:= 0.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GLPixelBuffer.GLPixelAttributes(int dataFormat, int dataType)` Deriving `componentCount` via GL `dataFormat`, i.e.
    `GLPixelBuffer.GLPixelAttributes(int componentCount, int dataFormat, int dataType)` Using user specified source `componentCount`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GLPixelBuffer.GLPixelAttributes` | `convert(PixelFormat pixFmt, GLProfile glp)` Returns the matching `GLPixelBuffer.GLPixelAttributes` for the given `PixelFormat` and `GLProfile` if exists, otherwise returns `null`.
    `PixelFormat` | `getPixelFormat()` Returns the matching `PixelFormat` of this `GLPixelBuffer.GLPixelAttributes` if exists, otherwise returns `null`.
    `String` | `toString()`

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNDEF

          public static final GLPixelBuffer.GLPixelAttributes UNDEF

      Undefined instance of `GLPixelBuffer.GLPixelAttributes`, having componentCount:=0, format:=0 and type:= 0.

    - #### componentCount

          public final int componentCount

      Pixel source component count, i.e. number of meaningful components.

    - #### format

          public final int format

      The OpenGL pixel data format

    - #### type

          public final int type

      The OpenGL pixel data type

    - #### bytesPerPixel

          public final int bytesPerPixel

      The OpenGL pixel size in bytes

  - ### Constructor Detail

    - #### GLPixelBuffer.GLPixelAttributes

          public GLPixelBuffer.GLPixelAttributes(int dataFormat,
                                         int dataType)

      Deriving `componentCount` via GL `dataFormat`, i.e. `GLBuffers.componentCount(int)` if > 0.
      Parameters:
        `dataFormat` - GL data format
        `dataType` - GL data type

    - #### GLPixelBuffer.GLPixelAttributes

          public GLPixelBuffer.GLPixelAttributes(int componentCount,
                                         int dataFormat,
                                         int dataType)

      Using user specified source `componentCount`.
      Parameters:
        `componentCount` - source component count
        `dataFormat` - GL data format
        `dataType` - GL data type

  - ### Method Detail

    - #### convert

          public static final GLPixelBuffer.GLPixelAttributes convert(PixelFormat pixFmt,
                                                GLProfile glp)

      Returns the matching `GLPixelBuffer.GLPixelAttributes` for the given `PixelFormat` and `GLProfile` if exists, otherwise returns `null`.

    - #### getPixelFormat

          public final PixelFormat getPixelFormat()

      Returns the matching `PixelFormat` of this `GLPixelBuffer.GLPixelAttributes` if exists, otherwise returns `null`.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright 2010 JogAmp Community.