IDirectDrawSurface7::SetPriority method

Assigns the texture-management priority for this texture. This method succeeds only on managed textures.

Syntax


HRESULT SetPriority(
  [in]  DWORD dwPriority
);

Parameters

dwPriority [in]

A value that specifies the new texture-management priority for the texture.

Return value

If the method succeeds, the return value is DD_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.

Remarks

SetPriority was introduced with the IDirectDrawSurface7 interface.

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 surfaces that were created with the DDSCAPS2_TEXTUREMANAGE flag). If you call SetPriority on a nonmanaged texture, SetPriority fails and returns DDERR_INVALIDOBJECT.

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the SetPriority method.

Requirements

Header

Ddraw.h

Library

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Community Additions

ADD
Show:
© 2014 Microsoft