Enum gfx::Usage []

pub enum Usage {
    GpuOnly,
    Const,
    Dynamic,
    CpuOnly(MapAccess),
}

A hint as to how this buffer/texture will be used.

The nature of these hints make them very implementation specific. Different drivers on different hardware will handle them differently. Only careful profiling will tell which is the best to use for a specific buffer.

Variants

GPU: read + write, CPU: copy. Optimal for render targets.

GPU: read, CPU: none. Optimal for resourced textures/buffers.

GPU: read, CPU: write.

GPU: copy, CPU: as specified. Used as a staging buffer, to be copied back and forth with on-GPU targets.

Trait Implementations

impl Eq for Usage

impl Ord for Usage

impl PartialEq<Usage> for Usage

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd<Usage> for Usage

impl Hash for Usage

impl Copy for Usage

impl Clone for Usage

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Usage

Formats the value using the given formatter.