Package icyllis.arc3d.engine
Class GpuRenderTarget
java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.GpuSurface
icyllis.arc3d.engine.GpuRenderTarget
- All Implemented Interfaces:
RefCounted
- Direct Known Subclasses:
GLRenderTarget
,VulkanRenderTarget
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 Image
s
or a wrapped presentable object.
This class is used by the pipeline internally. Use RenderTargetProxy
for
high-level operations.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
GpuRenderTarget
(Context context, int width, int height, int sampleCount, int numColorTargets) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionasImage()
Deprecated.If this object is image, returns this.final GpuRenderTarget
Deprecated.If this object is RT, returns this.protected abstract boolean
Deprecated.abstract BackendFormat
Deprecated.Describes the backend format of color buffers.abstract BackendRenderTarget
Deprecated.Describes the backend render target of this render target.Deprecated.getColorAttachment
(int index) Deprecated.Deprecated.abstract int
Deprecated.Get the number of implicit depth bits, or 0 if no depth.Deprecated.Get the dynamic or implicit stencil buffer, or null if no stencil.final int
Deprecated.Returns the effective height (intersection) of color buffers.Deprecated.getResolveAttachment
(int index) Deprecated.Deprecated.final int
Deprecated.Returns the number of samples per pixel in color buffers (One if non-MSAA).abstract int
Deprecated.Get the number of implicit stencil bits, or 0 if no stencil.int
Deprecated.Surface flags.final int
getWidth()
Deprecated.Returns the effective width (intersection) of color buffers.final int
Deprecated.Methods inherited from class icyllis.arc3d.engine.GpuSurface
isProtected
Methods inherited from class icyllis.arc3d.engine.Resource
getContext, getDevice, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isWrapped, onRelease, onSetLabel, ref, refCommandBuffer, setKey, setLabel, setNonCacheable, unref, unrefCommandBuffer
-
Field Details
-
mSurfaceFlags
protected int mSurfaceFlagsDeprecated.
-
-
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 classGpuSurface
- 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 classGpuSurface
- 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 classGpuSurface
- Returns:
- the number of samples, greater than (multisample) or equal to one
-
getBackendFormat
Deprecated.Describes the backend format of color buffers.- Overrides:
getBackendFormat
in classGpuSurface
-
getBackendRenderTarget
Deprecated.Describes the backend render target of this render target. -
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 classGpuSurface
- Returns:
- raw ptr to the image
-
asRenderTarget
Deprecated.Description copied from class:GpuSurface
If this object is RT, returns this.If this object is image, returns null.
- Overrides:
asRenderTarget
in classGpuSurface
- 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-renderableImage
only.
- Specified by:
getSurfaceFlags
in classGpuSurface
- Returns:
- combination of the above flags
-
numColorTargets
public final int numColorTargets()Deprecated. -
getColorAttachment
Deprecated. -
getColorAttachment
Deprecated. -
getColorAttachments
Deprecated. -
getResolveAttachment
Deprecated. -
getResolveAttachment
Deprecated. -
getResolveAttachments
Deprecated. -
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 classGpuSurface
-
getStencilBits
public abstract int getStencilBits()Deprecated.Get the number of implicit stencil bits, or 0 if no stencil.- Specified by:
getStencilBits
in classGpuSurface
-
canAttachStencil
protected abstract boolean canAttachStencil()Deprecated.- Returns:
- whether a stencil buffer can be attached to this render target.
-