Sdílet prostřednictvím


TextureCreationParameters.ResourceManagementMode Property

Note

This property is available only when developing for Windows.

Gets or sets the class of memory allocated for this texture resource.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public ResourceManagementMode ResourceManagementMode { get; set; }

Property Value

The class of memory allocated for this texture resource. If this value is ResourceManagementMode.Automatic, the runtime will recreate the resource when the graphics device is reset. If this value is ResourceManagementMode.Manual, this resource should be reinitialized when the graphics device is reset.

Remarks

On Windows, the GetData or SetData methods of a texture will fail if the texture ResourceManagementMode is ResourceManagementMode.Manual and the format cannot be used as a render target.

If this value is ResourceManagementMode.Automatic, ResourceUsage cannot be ResourceUsage.Dynamic.

See Also

Tasks

How to: Load Resources

Reference

GraphicsDeviceManager.DeviceReset Event
TextureCreationParameters Structure
TextureCreationParameters Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows XP SP2, Windows Vista