DirectX9 内存池

来源:互联网 发布:网络编码器 编辑:程序博客网 时间:2024/04/27 23:56

The memory pool is specified by one of the members of theD3DPOOLenumerated type. The memory pools available are:

D3DPOOL_DEFAULT—The default memory pool instructs Direct3D to place the resource in the memory that is best suited for the resource type and its usage. This may be video memory, AGP memory, or system memory. Note that resources in the default pool must be destroyed (released) prior to anIDirect 3DDevice9::Resetcall, and must be reinitialized after the reset call.

D3DPOOL_MANAGED—Resources placed in the manage pool are managed by Direct3D (that is, they are moved to video or AGP memory as needed by the device automatically). In addition, a back-up copy of the resource is maintained in system memory. When resources are accessed and changed by the application, they work with the system copy. Then, Direct3D automatically updates them to video memory as needed.

D3DPOOL_SYSTEMMEM—Specifies that the resource be placed in system memory

D3DPOOL_SCRATCH—Specifies that the resource be placed in system memory. The difference between this pool andD3DPOOL_ SYSTEMMEMis that these resources must not follow the graphics device’s restrictions. Consequently, the device cannot access resources in this pool. But the resources can be copied to and from each other.



0 0
原创粉丝点击