Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
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 Valuesare 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 D3DMFORMATenumerated type.

The class of memory that holds a resource's buffers is called a pool. Pool values are defined by the D3DMPOOLenumerated 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 D3DMRESOURCETYPEenumerated 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