C# Class TransvoxelXnaStudio.Host.GraphicsDeviceService

Helper class responsible for creating and managing the GraphicsDevice. All GraphicsDeviceControl instances share the same GraphicsDeviceService, so even though there can be many controls, there will only ever be a single underlying GraphicsDevice. This implements the standard IGraphicsDeviceService interface, which provides notification events for when the device is reset or disposed.
Inheritance: IGraphicsDeviceService
Afficher le fichier Open project: BinaryConstruct/Transvoxel-XNA Class Usage Examples

Méthodes publiques

Méthode Description
AddRef ( IntPtr windowHandle, int width, int height ) : GraphicsDeviceService

Gets a reference to the singleton instance.

Release ( bool disposing ) : void

Releases a reference to the singleton instance.

ResetDevice ( int width, int height ) : void

Resets the graphics device to whichever is bigger out of the specified resolution or its current size. This behavior means the device will demand-grow to the largest of all its GraphicsDeviceControl clients.

Private Methods

Méthode Description
GraphicsDeviceService ( IntPtr windowHandle, int width, int height ) : System

Constructor is private, because this is a singleton class: client controls should use the public AddRef method instead.

Method Details

AddRef() public static méthode

Gets a reference to the singleton instance.
public static AddRef ( IntPtr windowHandle, int width, int height ) : GraphicsDeviceService
windowHandle System.IntPtr
width int
height int
Résultat GraphicsDeviceService

Release() public méthode

Releases a reference to the singleton instance.
public Release ( bool disposing ) : void
disposing bool
Résultat void

ResetDevice() public méthode

Resets the graphics device to whichever is bigger out of the specified resolution or its current size. This behavior means the device will demand-grow to the largest of all its GraphicsDeviceControl clients.
public ResetDevice ( int width, int height ) : void
width int
height int
Résultat void