Table of Contents

Class GraphicsResource

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Queries and prepares resources.

public abstract class GraphicsResource : IDisposable
Inheritance
GraphicsResource
Implements
Derived
Inherited Members

Properties

GraphicsDevice

Gets the GraphicsDevice associated with this GraphicsResource.

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

IsDisposed

Gets a value that indicates whether the object is disposed.

public bool IsDisposed { get; }

Property Value

bool

Name

Gets the name of the resource.

public string Name { get; set; }

Property Value

string

Tag

Gets the resource tags for this resource.

public object Tag { get; set; }

Property Value

object

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

The method that derived classes should override to implement disposing of managed and native resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True if managed objects should be disposed.

Remarks

Native resources should always be released regardless of the value of the disposing parameter.

~GraphicsResource()

protected ~GraphicsResource()

GraphicsDeviceResetting()

Called before the device is reset. Allows graphics resources to invalidate their state so they can be recreated after the device reset. Warning: This may be called after a call to Dispose() up until the resource is garbage collected.

protected virtual void GraphicsDeviceResetting()

ToString()

Gets a string representation of the current instance.

public override string ToString()

Returns

string

Events

Disposing

Occurs when Dispose() is called or when this object is finalized and collected by the garbage collector.

public event EventHandler<EventArgs> Disposing

Event Type

EventHandler<EventArgs>