Enumeration TextureUsageFlag

Flags that describe how is a texture used.

Constructors

  • Parameters

    • do_not_: undefined
    • construct_: undefined
    • this_: undefined
    • type_: undefined

    Returns TextureUsageFlag

Values

CacheMipMapsOnDisk = 65536

Auto-generated mip maps will be cached in a local cache. Otherwise they might be either auto-generated or loaded from a package.

CPUCached = 4096

All texture data will also be cached in CPU memory, making it available for fast read access from the CPU.

CPUReadable = 8192

Allows the CPU to directly read the texture data buffers from the GPU.

Default = 1

A regular texture that is not often or ever updated from the CPU.

DepthStencil = 1024

Texture used as a depth/stencil buffer by the GPU.

Dynamic = 2

A regular texture that is often updated by the CPU.

LoadStore = 2048

Texture that allows load/store operations from the GPU program.

MutableFormat = 16384

Allows you to retrieve views of the texture using a format different from one specified on creation.

PersistentMipMaps = 32768

Mip-maps will persisted in the resource, when the texture is serialized. Otherwise they might be auto-generated on texture load.

Render = 512

Texture that can be rendered to by the GPU.

Methods

  • Takes an array of enum values and combines them as a single enum flag value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    Returns EnumValueTyped<T, number>

    The combined enum value.

  • Type Parameters

    • T

    Parameters

    Returns string

    Compatibility

  • Returns string[]

    Compatibility

  • Parameters

    • index: number

    Returns number

    Compatibility

  • Returns number[]

    Compatibility

  • Gets the name for the enumeration value that matches the specified enumValue.

    Type Parameters

    • T

    Parameters

    Returns string

    The enumeration value or undefined if not found.

  • Gets the enumeration names

    Returns string[]

    The enumeration names.

  • Gets the enumeration value at the specified index.

    Type Parameters

    • T = number

    Parameters

    • index: number

      The index.

    Returns EnumValueTyped<T, number>

    The enumeration value or undefined if not found.

  • Determines if the enum value has the flags set.

    Type Parameters

    Parameters

    Returns boolean

  • Determines if the enum bits were changed from previousValue to currentValue.

    Type Parameters

    Parameters

    Returns boolean

  • Iterates the enumeration names

    Returns Generator<string, any, any>

    The enumeration names.

  • Iterates the enumeration values

    Type Parameters

    • T = any

    Returns Generator<EnumValueTyped<T, number>, any, any>

    The enumeration values.

  • Takes a single enum value and splits it into separated flag values set on the value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    • value: number | BrandedType<number, "enum"> | BrandedType<T, "enum">

      The enum value to have it's value split using bitwise-and operator.

    Returns EnumValueTyped<T, number>[]

    An array of each "bit flag" set in the enum.