Package icyllis.arc3d.engine
Class GpuSurface
java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.GpuSurface
- All Implemented Interfaces:
RefCounted
- Direct Known Subclasses:
GpuRenderTarget
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 Image
s 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 Summary
ModifierConstructorDescriptionprotected
GpuSurface
(Context context, boolean budgeted, boolean wrapped, long memorySize) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionasImage()
Deprecated.If this object is image, returns this.Deprecated.If this object is RT, returns this.Deprecated.Returns the backend format of the surface.abstract int
Deprecated.abstract int
Deprecated.abstract int
Deprecated.Returns the number of samples per pixel in color buffers (one if non-MSAA).abstract int
Deprecated.abstract int
Deprecated.Surface flags.abstract int
getWidth()
Deprecated.abstract boolean
Deprecated.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
-
Constructor Details
-
GpuSurface
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
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-renderableImage
only.
- Returns:
- combination of the above flags
-
isProtected
public abstract boolean isProtected()Deprecated.- Returns:
- true if we are working with protected content
-
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
Deprecated.If this object is RT, returns this.If this object is image, returns null.
- Returns:
- raw ptr to this
-