Class GpuSurface

java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.GpuSurface
All Implemented Interfaces:
RefCounted
Direct Known Subclasses:
GpuRenderTarget

@Deprecated public abstract class GpuSurface extends Resource
Deprecated.
Interface representing GPU surfaces.

There are two implementations: one is Image, which contains image data and allocates memory; and the other is GpuRenderTarget, which is a container object that represents a combination of Images as attachments, and managed all objects used by the rendering pipeline for the fixed combination of attachments (compatible render passes and framebuffers).

See Also:
  • Constructor Details

    • GpuSurface

      protected GpuSurface(Context context, boolean budgeted, boolean wrapped, long memorySize)
      Deprecated.
  • Method Details

    • getWidth

      public abstract int getWidth()
      Deprecated.
      Returns:
      the width of the surface in pixels, greater than zero
    • getHeight

      public abstract int getHeight()
      Deprecated.
      Returns:
      the height of the surface in pixels, greater than zero
    • getBackendFormat

      @Nonnull public BackendFormat getBackendFormat()
      Deprecated.
      Returns the backend format of the surface.

      If this is RT, returns the backend format of color attachment 0.

    • getDepthBits

      public abstract int getDepthBits()
      Deprecated.
    • getStencilBits

      public abstract int getStencilBits()
      Deprecated.
    • getSampleCount

      public abstract int getSampleCount()
      Deprecated.
      Returns the number of samples per pixel in color buffers (one if non-MSAA).
      Returns:
      the number of samples, greater than (multi-sampled) or equal to one
    • getSurfaceFlags

      public abstract int getSurfaceFlags()
      Deprecated.
      Surface flags.
      • ISurface.FLAG_BUDGETED - Indicates whether an allocation should count against a cache budget. Budgeted when set, otherwise not budgeted.
      • ISurface.FLAG_MIPMAPPED - Used to say whether an image has mip levels allocated or not. Mipmaps are allocated when set, otherwise mipmaps are not allocated. Image only.
      • ISurface.FLAG_RENDERABLE - Used to say whether a surface can be rendered to, whether an image can be used as color attachments. Renderable when set, otherwise not renderable.
      • ISurface.FLAG_PROTECTED - Used to say whether image is backed by protected memory. Protected when set, otherwise not protected.
      • ISurface.FLAG_READ_ONLY - Means the pixels in the image are read-only. Non-renderable Image only.
      Returns:
      combination of the above flags
    • isProtected

      public abstract boolean isProtected()
      Deprecated.
      Returns:
      true if we are working with protected content
    • asImage

      @RawPtr public @RawPtr Image asImage()
      Deprecated.
      If this object is image, returns this.

      If this object is RT, returns the resolve attachment 0 if available, or returns the color attachment 0 if available, or null.

      Returns:
      raw ptr to the image
    • asRenderTarget

      @RawPtr public @RawPtr GpuRenderTarget asRenderTarget()
      Deprecated.
      If this object is RT, returns this.

      If this object is image, returns null.

      Returns:
      raw ptr to this