Package icyllis.arc3d.opengl

# Class GLImageDesc

java.lang.Object
icyllis.arc3d.engine.ImageDesc
icyllis.arc3d.opengl.GLImageDesc

@Immutable public final class GLImageDesc extends ImageDesc
Descriptor to create OpenGL images (textures and renderbuffers). The `mFormat` here should be a sized, internal format for the texture. We use the sized format since the base internal formats are deprecated.

Note the target can be `GL30C.GL_RENDERBUFFER`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `mFormat`
  `GLenum` - sized internal format
  `final int`
  `mTarget`
  `GLenum` - image namespace

  ### Fields inherited from class icyllis.arc3d.engine.ImageDesc

  `mArraySize, mDepth, mFlags, mHeight, mImageType, mMipLevelCount, mSampleCount, mWidth`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GLImageDesc(int target, int format, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `getBackend()`
  `int`
  `getBytesPerBlock()`
  `int`
  `getChannelFlags()`
  Gets the channels present in the format as a bitfield of ColorChannelFlag values.
  `int`
  `getCompressionType()`
  `int`
  `getDepthBits()`
  `int`
  `getGLFormat()`
  If the backend API is OpenGL this gets the format as a GLenum.
  `int`
  `getStencilBits()`
  `int`
  `hashCode()`
  `boolean`
  `isSRGB()`
  `String`
  `toString()`

  ### Methods inherited from class icyllis.arc3d.engine.ImageDesc

  `getArraySize, getDepth, getHeight, getImageType, getMipLevelCount, getSampleCount, getVkFormat, getWidth, isCompressed, isMipmapped, isMultisampled, isProtected, isRenderable, isSampledImage, isStorageImage`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### mTarget

    public final int mTarget
    `GLenum` - image namespace

  - ### mFormat

    public final int mFormat
    `GLenum` - sized internal format

- ## Constructor Details

  - ### GLImageDesc

    public GLImageDesc(int target, int format, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags)

- ## Method Details

  - ### getBackend

    public int getBackend()
    Specified by:
      `getBackend` in class `ImageDesc`
    Returns:
      see `Engine.BackendApi`

  - ### getGLFormat

    public int getGLFormat()
    Description copied from class: `ImageDesc`
    If the backend API is OpenGL this gets the format as a GLenum.
    Overrides:
      `getGLFormat` in class `ImageDesc`

  - ### getChannelFlags

    public int getChannelFlags()
    Description copied from class: `ImageDesc`
    Gets the channels present in the format as a bitfield of ColorChannelFlag values.
    Overrides:
      `getChannelFlags` in class `ImageDesc`
    See Also:
      - `Color.COLOR_CHANNEL_FLAGS_RGBA`

  - ### isSRGB

    public boolean isSRGB()
    Overrides:
      `isSRGB` in class `ImageDesc`

  - ### getCompressionType

    public int getCompressionType()
    Overrides:
      `getCompressionType` in class `ImageDesc`
    See Also:
      - `ColorInfo.COMPRESSION_NONE`

  - ### getBytesPerBlock

    public int getBytesPerBlock()
    Overrides:
      `getBytesPerBlock` in class `ImageDesc`
    Returns:
      if compressed, bytes per block, otherwise bytes per pixel

  - ### getDepthBits

    public int getDepthBits()
    Overrides:
      `getDepthBits` in class `ImageDesc`

  - ### getStencilBits

    public int getStencilBits()
    Overrides:
      `getStencilBits` in class `ImageDesc`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`