Defines the memory class that holds buffers for a resource.
Definition
Visual Basic
Public Enum Pool
C#
public enum Pool
C++
public enum class Pool
JScript
public enum Pool
Members
Member
Value
Description
Scratch
3
Resources are placed in system RAM and do not need to be re-created when a device is lost. These resources are not bound by device size or format restrictions; therefore, they cannot be accessed by the Microsoft Direct3D device or set as textures or render targets. They can, however, always be created, locked, and copied.
SystemMemory
2
Resources consume system RAM but do not reduce pageable RAM. System memory is not typically accessible by the 3-D device. These resources do not need to be re-created when a device is lost. They can be locked and also used as the source for a Device.UpdateSurface or Device.UpdateTexture operation to a memory resource created with Default.
Managed
1
Resources are copied automatically to device-accessible memory as needed. Managed resources are backed by system memory and do not need to be re-created when a device is lost. For more information, see Managing Resources.
Default
0
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 accelerated graphics port memory. The Default pool is separate from Managed and SystemMemory, and it specifies that the resource be placed in the preferred memory for device access. Note that Default never indicates that either Managed or SystemMemory should be chosen as the memory pool type for this resource. Textures placed in the Default pool cannot be locked unless they are dynamic textures or private four-character code (FOURCC) driver formats. Accessing unlockable textures requires the use of functions such as Device.UpdateSurface or Device.UpdateTexture. Managed is probably a better choice than Default for most applications. Some textures can be locked; for example, those created in driver proprietary pixel formats that are unknown to the Direct3D runtime. Swap-chain back buffers, render targets, vertex buffers, and index buffers can be locked. When a device is lost, resources created using Default must be disposed of before calling Device.Reset. Microsoft DirectX 9.0 for Managed Code automatically handles disposal of resources that need it, provided the Device.IsUsingEventHandlers property is set to true (the default setting). For more information, see Lost Devices.