Export (0) Print
Expand All

IDirect3DResource9::SetPriority method

Assigns the priority of a resource for scheduling purposes.

Syntax


DWORD SetPriority(
  [in]  DWORD PriorityNew
);

Parameters

PriorityNew [in]

Type: DWORD

Priority to assign to a resource.

Differences between Direct3D 9 and Direct3D 9 for Windows Vista

The priority can be any DWORD value; Direct3D 9 for Windows Vista also supports any of these pre-defined values D3D9_RESOURCE_PRIORITY.

 

Return value

Type: DWORD

Returns the previous priority value for the resource.

Remarks

This method is used to change the priority of managed resources (resources created with the D3DPOOL_MANAGED flag). This method returns 0 on non-managed resources.

Priorities are used to determine when managed resources are to be removed from memory. A resource assigned a low priority is removed before a resource with a high priority. If two resources have the same priority, the resource that was used more recently is kept in memory; the other resource is removed. Managed resources have a default priority of 0.

Windows Vista only - When this method is called using an IDirect3D9Ex interface, only resources created with the D3DPOOL_DEFAULT flag will be affected.

Requirements

Header

D3D9.h

Library

D3D9.lib

 

 

Community Additions

ADD
Show:
© 2014 Microsoft