Microsoft DirectX 8.1 (Visual Basic)

CONST_D3DUSAGEFLAGS

Defines constants that define usages for resources.

Enum CONST_D3DUSAGEFLAGS
    D3DUSAGE_RENDERTARGET       =   1
    D3DUSAGE_DEPTHSTENCIL       =   2
    D3DUSAGE_WRITEONLY          =   8
    D3DUSAGE_SOFTWAREPROCESSING =  16 (&H10)
    D3DUSAGE_DONOTCLIP          =  32 (&H20)
    D3DUSAGE_POINTS             =  64 (&H40)
    D3DUSAGE_RTPATCHES          = 128 (&H80)
    D3DUSAGE_NPATCHES           = 256 (&H100)
    D3DUSAGE_DYNAMIC            = 512 (&H200)
End Enum

Constants

D3DUSAGE_RENDERTARGET
Set to indicate that the surface is to be used as a render target. The resource can be passed to the RenderTarget parameter of the Direct3DDevice8.SetRenderTarget method.

This usage is automatically applied for a render target resource.

D3DUSAGE_DEPTHSTENCIL
Set to indicate that the surface is to be used as a depth-stencil surface. The resource can be passed to the NewZStencil parameter of SetRenderTarget.

This usage is automatically applied for a depth-stencil resource.

D3DUSAGE_WRITEONLY
Informs the system that the application writes only to the buffer. Using this flag enables the driver to select the best memory location for efficient write operations and rendering. Attempts to read from a buffer that is created with this capability can result in degraded performance.

This flag is valid only for index and vertex buffer resources.

D3DUSAGE_SOFTWAREPROCESSING
Set to indicate that the buffer is to be used with software processing.

This flag is valid only for index and vertex buffer resources.

D3DUSAGE_DONOTCLIP
Set to indicate that the vertex buffer content will never require clipping.

This flag is valid only for vertex buffer resources.

D3DUSAGE_POINTS
Set to indicate when a vertex or index buffer is to be used for drawing point sprites or indexed point lists.
D3DUSAGE_RTPATCHES
Set to indicate when a vertex or index buffer is to be used for drawing high-order surfaces.
D3DUSAGE_NPATCHES
Set to indicate when the vertex or index buffer is to be used for drawing N patches.
D3DUSAGE_DYNAMIC
Set to indicate when the vertex or index buffer requires dynamic memory usage. This usage is useful for drivers since it enables them to decide where to place the driver. In general, static vertex buffers are placed in video memory and dynamic vertex buffers are placed in AGP memory. Note that there is no separate static usage. If you do not specify D3DUSAGE_DYNAMIC, the vertex buffer is made static. D3DUSAGE_DYNAMIC is strictly enforced through the D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE locking flags. As a result, D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE are valid only on vertex and index buffers created with D3DUSAGE_DYNAMIC. They are not valid flags on static vertex buffers.

Note that D3DUSAGE_DYNAMIC cannot be specified on managed vertex and index buffers. For more information, see Managing Resources.

This flag is valid only for index and vertex buffer resources.

See Also

Direct3DDevice8.CreateCubeTexture, Direct3DDevice8.CreateIndexBuffer, Direct3DDevice8.CreateTexture, Direct3DDevice8.CreateVertexBuffer, Direct3DDevice8.CreateVolumeTexture