Platform SDK: DirectX |
The IDirectDrawSurface7::GetPriority method retrieves the texture-management priority for this texture. This method succeeds only on managed textures (see Remarks).
HRESULT GetPriority( LPDWORD lpdwPriority );
If the method succeeds, the return value is D3D_OK.
If it fails, the return value is an error. The method returns 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 set and retrieve priorities only 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.
This method was introduced with the IDirectDrawSurface7 interface.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.
IDirectDrawSurface7::SetPriority, Automatic Texture Management, Textures