[][src]Enum rafx_api::RafxRenderTarget

pub enum RafxRenderTarget {
    Vk(RafxRenderTargetVulkan),
}

Render targets are writable textures that the GPU can render to.

The general flow is to bind a render target and pipeline to a command buffer and draw primitives.

Render targets can generally be used in APIs that accept textures. (However they may require being transitioned to a state appropriate to how they will be used.)

Render targets are cloneable because they are sometimes owned by the swapchain. Using a render target provided by a swapchain after the swapchain has been destroyed will result in undefined behavior. However, a render target created by an application can be used as long as it is not dropped and as long as the GPU is using it.

Render targets not owned by a swapchain must not be dropped if they are in use by the GPU. (Individual clones may be dropped, but one of the instances must remain)

Variants

Implementations

impl RafxRenderTarget[src]

pub fn render_target_def(&self) -> &RafxRenderTargetDef[src]

Return the metadata used to create the render target

pub fn texture(&self) -> &RafxTexture[src]

Returns this render target as a texture. (All render targets can be used as textures.)

pub fn vk_render_target(&self) -> Option<&RafxRenderTargetVulkan>[src]

Get the underlying vulkan API object. This provides access to any internally created vulkan objects.

Trait Implementations

impl Clone for RafxRenderTarget[src]

impl Debug for RafxRenderTarget[src]

impl From<RafxRenderTarget> for RafxImage[src]

impl Into<RafxRenderTarget> for RafxRenderTargetVulkan[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Downcast + Send + Sync
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.