Class GpuRenderTarget

All Implemented Interfaces:
RefCounted
Direct Known Subclasses:
GLRenderTarget, VulkanRenderTarget

@Deprecated public abstract class GpuRenderTarget extends GpuSurface
Deprecated.
The GpuRenderTarget manages all objects used by a rendering pipeline, which are framebuffers, render passes and a set of attachments. This is the target of OpsRenderPass, and may be associated with Surface.

A GpuRenderTarget may be associated with one or more renderable Images or a wrapped presentable object. This class is used by the pipeline internally. Use RenderTargetProxy for high-level operations.

  • Field Details

    • mSurfaceFlags

      protected int mSurfaceFlags
      Deprecated.
  • Constructor Details

    • GpuRenderTarget

      protected GpuRenderTarget(Context context, int width, int height, int sampleCount, int numColorTargets)
      Deprecated.
  • Method Details

    • getWidth

      public final int getWidth()
      Deprecated.
      Returns the effective width (intersection) of color buffers.
      Specified by:
      getWidth in class GpuSurface
      Returns:
      the width of the surface in pixels, greater than zero
    • getHeight

      public final int getHeight()
      Deprecated.
      Returns the effective height (intersection) of color buffers.
      Specified by:
      getHeight in class GpuSurface
      Returns:
      the height of the surface in pixels, greater than zero
    • getSampleCount

      public final int getSampleCount()
      Deprecated.
      Returns the number of samples per pixel in color buffers (One if non-MSAA).
      Specified by:
      getSampleCount in class GpuSurface
      Returns:
      the number of samples, greater than (multisample) or equal to one
    • getBackendFormat

      @Nonnull public abstract BackendFormat getBackendFormat()
      Deprecated.
      Describes the backend format of color buffers.
      Overrides:
      getBackendFormat in class GpuSurface
    • getBackendRenderTarget

      @Nonnull public abstract BackendRenderTarget getBackendRenderTarget()
      Deprecated.
      Describes the backend render target of this render target.
    • asImage

      public Image asImage()
      Deprecated.
      Description copied from class: GpuSurface
      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.

      Overrides:
      asImage in class GpuSurface
      Returns:
      raw ptr to the image
    • asRenderTarget

      public final GpuRenderTarget asRenderTarget()
      Deprecated.
      Description copied from class: GpuSurface
      If this object is RT, returns this.

      If this object is image, returns null.

      Overrides:
      asRenderTarget in class GpuSurface
      Returns:
      raw ptr to this
    • getSurfaceFlags

      public int getSurfaceFlags()
      Deprecated.
      Description copied from class: GpuSurface
      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.
      Specified by:
      getSurfaceFlags in class GpuSurface
      Returns:
      combination of the above flags
    • numColorTargets

      public final int numColorTargets()
      Deprecated.
    • getColorAttachment

      @RawPtr @Nullable public abstract @RawPtr Image getColorAttachment()
      Deprecated.
    • getColorAttachment

      @RawPtr @Nullable public abstract @RawPtr Image getColorAttachment(int index)
      Deprecated.
    • getColorAttachments

      @RawPtr @Nullable protected abstract @RawPtr Image[] getColorAttachments()
      Deprecated.
    • getResolveAttachment

      @RawPtr @Nullable public abstract @RawPtr Image getResolveAttachment()
      Deprecated.
    • getResolveAttachment

      @RawPtr @Nullable public abstract @RawPtr Image getResolveAttachment(int index)
      Deprecated.
    • getResolveAttachments

      @RawPtr @Nullable protected abstract @RawPtr Image[] getResolveAttachments()
      Deprecated.
    • getDepthStencilAttachment

      @RawPtr @Nullable public abstract @RawPtr Image getDepthStencilAttachment()
      Deprecated.
      Get the dynamic or implicit stencil buffer, or null if no stencil.
    • getDepthBits

      public abstract int getDepthBits()
      Deprecated.
      Get the number of implicit depth bits, or 0 if no depth.
      Specified by:
      getDepthBits in class GpuSurface
    • getStencilBits

      public abstract int getStencilBits()
      Deprecated.
      Get the number of implicit stencil bits, or 0 if no stencil.
      Specified by:
      getStencilBits in class GpuSurface
    • canAttachStencil

      protected abstract boolean canAttachStencil()
      Deprecated.
      Returns:
      whether a stencil buffer can be attached to this render target.