D2D1_RESOURCE_TYPE enumeration

Specifies which kinds of resources should be released when ID2D1Device::ClearResources is invoked.

Syntax

typedef enum  { 
  D2D1_RESOURCE_TYPE_NONE    = 0,
  D2D1_RESOURCE_TYPE_SHADER  = 1,
  D2D1_RESOURCE_TYPE_BUFFER  = 2
} D2D1_RESOURCE_TYPE;

Constants

  • D2D1_RESOURCE_TYPE_NONE
    No resources will be cleared.

  • D2D1_RESOURCE_TYPE_SHADER
    Any unreferenced shader resources will be released.

  • D2D1_RESOURCE_TYPE_BUFFER
    Any unreferenced buffer resources will be released.

Remarks

The buffer resource type includes cached vertex buffers or textures.

Pixel shaders are comparatively small and take considerable resources to compile. The application should be conservative in discarding these resources. Maintaining references to effects that the application will use in the future will often prevent these shaders from being discarded.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

See also

ID2D1Device::ClearResources