Table of Contents

Interface IGraphicsDeviceFactory

Namespace
Stride.Games
Assembly
Stride.Games.dll

Base interface for a factory that creates GraphicsDevice instances.

public interface IGraphicsDeviceFactory
Extension Methods

Remarks

The implementers of IGraphicsDeviceFactory are responsible for creating GraphicsDevice instances, and for selecting the best device based on the preferred configuration.

A good example of a factory is the Stride.Games.GamePlatform class, which not only abstracts the platform, but also the windowing system and the Graphics Device creation.

Methods

CreateDevice(GraphicsDeviceInformation)

Creates a Graphics Device with the specified configuration.

GraphicsDevice CreateDevice(GraphicsDeviceInformation deviceInformation)

Parameters

deviceInformation GraphicsDeviceInformation

The GraphicsDeviceInformation containing the Graphics Adapter, Graphics Profile, and other relevant flags and parameters required to configure the Graphics Device.

Returns

GraphicsDevice

The created Graphics Device.

FindBestDevices(GameGraphicsParameters)

Returns a list of GraphicsDeviceInformation instances, representing the best found Graphics Adapters and their corresponding configuration to create a Graphics Device based on the given graphics parameters.

List<GraphicsDeviceInformation> FindBestDevices(GameGraphicsParameters graphicsParameters)

Parameters

graphicsParameters GameGraphicsParameters

The preferred graphics configuration.

Returns

List<GraphicsDeviceInformation>

A list of the best found configurations for creating a Graphics Device.