Package icyllis.arc3d.core

# Class SurfaceCharacterization

java.lang.Object
icyllis.arc3d.core.SurfaceCharacterization

public final class SurfaceCharacterization extends Object
A surface characterization contains all the information Engine requires to make its internal rendering decisions. When passed into a `DisplayListRecorder` it will copy the data and pass it on to the `DisplayList` if/when it is created. Note that both of those objects (the Recorder and the DisplayList) will take a ref on the `SharedContext` object.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SurfaceCharacterization(SharedContext contextInfo, long cacheMaxResourceBytes, ImageInfo imageInfo, BackendFormat backendFormat, int origin, int sampleCount, boolean texturable, boolean mipmapped, boolean glWrapDefaultFramebuffer, boolean vkSupportInputAttachment, boolean vkSecondaryCommandBuffer, boolean isProtected)`
  Create via `SharedContext.createCharacterization(long, icyllis.arc3d.core.ImageInfo, icyllis.arc3d.engine.BackendFormat, int, int, boolean, boolean, boolean, boolean, boolean, boolean)`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SurfaceCharacterization`
  `createBackendFormat(int colorType, BackendFormat backendFormat)`
  Return a new surface characterization with the backend format replaced.
  `SurfaceCharacterization`
  `createDefaultFramebuffer(boolean useDefaultFramebuffer)`
  Return a new surface characterization with just a different use of FBO 0 (in GL).
  `SurfaceCharacterization`
  `createResized(int width, int height)`
  Return a new surface characterization with the only difference being a different width and height
  `boolean`
  `equals(Object o)`
  `BackendFormat`
  `getBackendFormat()`
  `long`
  `getCacheMaxResourceBytes()`
  `int`
  `getColorType()`
  `SharedContext`
  `getContextInfo()`
  `int`
  `getHeight()`
  `ImageInfo`
  `getImageInfo()`
  `int`
  `getOrigin()`
  `int`
  `getSampleCount()`
  `int`
  `getWidth()`
  `boolean`
  `glWrapDefaultFramebuffer()`
  `int`
  `hashCode()`
  `boolean`
  `isCompatible(BackendImage texture)`
  Is the provided backend texture compatible with this surface characterization?
  `boolean`
  `isMipmapped()`
  `boolean`
  `isProtected()`
  `boolean`
  `isTexturable()`
  `boolean`
  `vkSecondaryCommandBuffer()`
  `boolean`
  `vkSupportInputAttachment()`

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

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

- ## Constructor Details

  - ### SurfaceCharacterization

    @Internal public SurfaceCharacterization(SharedContext contextInfo, long cacheMaxResourceBytes, ImageInfo imageInfo, BackendFormat backendFormat, int origin, int sampleCount, boolean texturable, boolean mipmapped, boolean glWrapDefaultFramebuffer, boolean vkSupportInputAttachment, boolean vkSecondaryCommandBuffer, boolean isProtected)
    Create via `SharedContext.createCharacterization(long, icyllis.arc3d.core.ImageInfo, icyllis.arc3d.engine.BackendFormat, int, int, boolean, boolean, boolean, boolean, boolean, boolean)`.

- ## Method Details

  - ### createResized

    @Nullable public SurfaceCharacterization createResized(int width, int height)
    Return a new surface characterization with the only difference being a different width and height

  - ### createBackendFormat

    @Nullable public SurfaceCharacterization createBackendFormat(int colorType, BackendFormat backendFormat)
    Return a new surface characterization with the backend format replaced. A colorType must also be supplied to indicate the interpretation of the new format.

  - ### createDefaultFramebuffer

    @Nullable public SurfaceCharacterization createDefaultFramebuffer(boolean useDefaultFramebuffer)
    Return a new surface characterization with just a different use of FBO 0 (in GL).

  - ### getContextInfo

    @Internal public SharedContext getContextInfo()

  - ### getCacheMaxResourceBytes

    public long getCacheMaxResourceBytes()

  - ### getImageInfo

    public ImageInfo getImageInfo()

  - ### getBackendFormat

    public BackendFormat getBackendFormat()

  - ### getOrigin

    public int getOrigin()

  - ### getWidth

    public int getWidth()

  - ### getHeight

    public int getHeight()

  - ### getColorType

    public int getColorType()

  - ### getSampleCount

    public int getSampleCount()

  - ### isTexturable

    public boolean isTexturable()

  - ### isMipmapped

    public boolean isMipmapped()

  - ### glWrapDefaultFramebuffer

    public boolean glWrapDefaultFramebuffer()

  - ### vkSupportInputAttachment

    public boolean vkSupportInputAttachment()

  - ### vkSecondaryCommandBuffer

    public boolean vkSecondaryCommandBuffer()

  - ### isProtected

    public boolean isProtected()

  - ### isCompatible

    public boolean isCompatible(BackendImage texture)
    Is the provided backend texture compatible with this surface characterization?

  - ### equals

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

  - ### hashCode

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