DirectX SDK |
The DirectDrawSurface7.GetPriority method retrieves the texture management priority for this texture. This method succeeds only on managed textures (see Remarks).
object.GetPriority() As Long
If the method succeeds, it returns the texture priority.
If the method fails, it raises an error, and Err.Number can be set to DDERR_INVALIDOBJECT if the parameter is invalid or if the texture is not managed by Direct3D.
Priorities are used to determine when managed textures are to be removed from memory. A texture assigned a low priority is removed before a texture with a high priority. If two textures have the same priority, the texture that was used more recently is kept in memory; the other texture is removed.
Applications can only set and retrieve priorities for managed textures (those that were created with the DDSCAPS2_TEXTUREMANAGE flag). Calling this method on a nonmanaged texture causes the method to fail and return DDERR_INVALIDOBJECT
DirectDrawSurface7.SetPriority, Automatic Texture Management