Compartilhar via


Resource Properties

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

All resources share the following properties:

  • Usage. The way a resource is used — for example, as a texture or a render target.
  • Format. The format of the data — for example, the pixel format of a 2-D surface.
  • Pool. The type of memory where the resource is allocated.
  • Type. The type of resource — for example, a vertex buffer or render target.

Resource uses are enforced. An application that will use a resource in a certain operation must specify that operation at resource creation time. The following D3DMUSAGE Values are defined for resources:

  • D3DMUSAGE_DONOTCLIP
  • D3DMUSAGE_DYNAMIC
  • D3DMUSAGE_RENDERTARGET
  • D3DMUSAGE_SOFTWAREPROCESSING
  • D3DMUSAGE_WRITEONLY

For details on the usage flags and how they relate to specific resources, see the reference pages on the individual resource creation methods.

For information on the surface format of resources, see the D3DMFORMAT enumerated type.

The class of memory that holds a resource's buffers is called a pool. Pool values are defined by the D3DMPOOL enumerated type. A pool cannot be mixed for different objects contained in a single resource — that is, mip levels in a mipmap — and once a pool is chosen for a resource, the pool cannot be changed.

The resources types are set implicitly at run time when the application calls a resource creation method such as IDirect3DMobileVertexBuffer. Resource types are defined by the D3DMRESOURCETYPE enumerated type. Applications can query these types at run time; however, it is expected that most scenarios will not require run-time type checking.

See Also

Concepts

Common Details for Direct3D Mobile Resources