Resource.SetPriority(Int32) Method (Microsoft.DirectX.Direct3D)

Assigns the resource-management priority for the current resource.

Definition

Visual Basic Public Function SetPriority( _
    ByVal priorityNew As Integer _
) As Integer
C# public int SetPriority(
    int priorityNew
);
C++ public:
int SetPriority(
    int priorityNew
);
JScript public function SetPriority(
    priorityNew : int
) : int;

Parameters

priorityNew System.Int32
New resource-management priority for the resource.

Return Value

System.Int32
Previous priority value for the resource.

Remarks

Resource.SetPriority is used for priority control of managed resources. This method returns 0 on nonmanaged resources.

Priorities are used to determine when managed resources should 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 one that was used more recently is kept in memory, while the other is removed. Managed resources have a default priority of 0.

Applies To

BaseTexture, IndexBuffer, Surface, VertexBuffer