This enumeration defines the memory class that holds a resource's buffers.

typedef enum _D3DPOOL {
  D3DPOOL_FORCE_DWORD = 0x7fffffff


    Resources are placed in the memory pool most appropriate for the set of usages requested for the given resource. This is usually video memory, including both local video memory and AGP memory. The D3DPOOL_DEFAULT pool is separate from D3DPOOL_MANAGED and D3DPOOL_SYTEMMEM, and it specifies that the resource is placed in the preferred memory for device access. Note that D3DPOOL_DEFAULT never indicates that either D3DPOOL_MANAGED or D3DPOOL_SYSTEMMEM should be chosen as the memory pool type for this resource. Textures placed in the D3DPOOL_DEFAULT pool cannot be locked and are therefore not directly accessible. Instead, you must use functions such as IDirect3Ddevice8::CopyRects and IDirect3dDevice8::UpdateTexture. D3DPOOL_MANAGED is probably a better choice than D3DPOOL_DEFAULT for most applications. Note that some textures created in driver proprietary pixel formats, unknown to the Direct3D runtime, can be locked. Also note that — unlike textures — swapchain back-buffers, render targets, vertex buffers, and index buffers can be locked.

    When a device is lost, resources created using D3DPOOL_DEFAULT must be released before calling IDirect3DDevice8::Reset. See Lost Devices for more information.

    Resources are copied automatically to device-accessible memory as needed. Managed resources are backed by system memory and do not need to be recreated when a device is lost. See Managing Resources for more information. Managed resources can be locked. Only the system-memory copy is directly modified. Direct3D copies your changes to driver-accessible memory as needed.

    Memory that is not typically accessible by the 3-D device. Consumes system RAM but does not reduce pageable RAM. These resources do not need to be recreated when a device is lost. Resources in this pool can be locked and can be used as the source for a IDirect3DDevice8::CopyRects or IDirect3DDevice8::UpdateTexture operation to a memory resource created with D3DPOOL_DEFAULT.

    Forces this enumeration to compile to 32 bits in size. This value is not used.


Pools cannot be mixed for different objects contained within one resource (mip levels in a mipmap), and once a pool is chosen it cannot be changed.

Applications should use D3DPOOL_MANAGED for most static resources because this saves the application from having to deal with lost devices. (Managed resources are restored by the runtime.) This is especially beneficial for UMA systems. Dynamic texture resources can also work well with D3DPOOL_MANAGED, in spite of the high frequency at which they change. Other dynamic resources are not good with D3DPOOL_MANAGED. In fact, index buffers and vertex buffers cannot be created using D3DPOOL_MANAGED together with D3DUSAGE_DYNAMIC.

For dynamic textures, it is sometimes desirable to use a pair of video memory and system memory textures, allocating the video memory using D3DPOOL_DEFAULT and the system memory using D3DPOOL_SYSTEMMEM. You can lock and modify the bits of the system memory texture using a locking method. Then you can update the video memory texture using IDirect3DDevice8::UpdateTexture.


OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8types.h.

See Also

IDirect3DDevice8::CreateIndexBuffer | IDirect3DDevice8::CreateTexture | IDirect3DDevice8::CreateVertexBuffer | IDirect3DDevice8::UpdateTexture | D3DINDEXBUFFER_DESC | D3DSURFACE_DESC | D3DVERTEXBUFFER_DESC

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.