Package icyllis.arc3d.mock

# Class MockBackendFormat

java.lang.Object
icyllis.arc3d.engine.BackendFormat
icyllis.arc3d.mock.MockBackendFormat

public final class MockBackendFormat extends BackendFormat

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MockBackendFormat(int colorType, int compressionType, short depthBits, boolean isStencilFormat)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getBackend()`
  `int`
  `getBytesPerBlock()`
  `int`
  `getChannelFlags()`
  Gets the channels present in the format as a bitfield of ColorChannelFlag values.
  `int`
  `getCompressionType()`
  `int`
  `getDepthBits()`
  `int`
  `getFormatKey()`
  `int`
  `getStencilBits()`
  `boolean`
  `isSRGB()`
  `static MockBackendFormat`
  `make(int colorType, int compressionType)`
  `static MockBackendFormat`
  `make(int colorType, int compressionType, int depthBits, boolean isStencilFormat)`

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

  `getGLFormat, getVkFormat, isCompressed, isExternal`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MockBackendFormat

    public MockBackendFormat(int colorType, int compressionType, short depthBits, boolean isStencilFormat)
    See Also:
      - `make(int, int, int, boolean)`

- ## Method Details

  - ### make

    @Nonnull public static MockBackendFormat make(int colorType, int compressionType)

  - ### make

    @Nonnull public static MockBackendFormat make(int colorType, int compressionType, int depthBits, boolean isStencilFormat)

  - ### getBackend

    public int getBackend()
    Specified by:
      `getBackend` in class `BackendFormat`
    See Also:
      - `Engine.BackendApi.kOpenGL`
      - `Engine.BackendApi.kVulkan`
      - `Engine.BackendApi.kMock`

  - ### getChannelFlags

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

  - ### isSRGB

    public boolean isSRGB()
    Specified by:
      `isSRGB` in class `BackendFormat`

  - ### getCompressionType

    public int getCompressionType()
    Specified by:
      `getCompressionType` in class `BackendFormat`
    See Also:
      - `ColorInfo.COMPRESSION_NONE`

  - ### getBytesPerBlock

    public int getBytesPerBlock()
    Specified by:
      `getBytesPerBlock` in class `BackendFormat`
    Returns:
      if compressed, bytes per block, otherwise bytes per pixel

  - ### getDepthBits

    public int getDepthBits()
    Specified by:
      `getDepthBits` in class `BackendFormat`

  - ### getStencilBits

    public int getStencilBits()
    Specified by:
      `getStencilBits` in class `BackendFormat`

  - ### getFormatKey

    public int getFormatKey()
    Specified by:
      `getFormatKey` in class `BackendFormat`
    Returns:
      a key that is unique in the backend