Class GameGraphicsParameters
Describes the preferred graphics configuration for a Game.
public class GameGraphicsParameters
- Inheritance
-
objectGameGraphicsParameters
- Extension Methods
Fields
ColorSpace
The color space to use for presenting the frame to the screen.
public ColorSpace ColorSpace
Field Value
Remarks
The Color Space defines how colors are represented and displayed on the screen. Common values include:
- Gamma It usually represents sRGB, the standard RGB color space used in most monitors and applications. It offers a limited range of colors suitable for general purposes.
- Linear A linear color space suitable for high-dynamic-range color values like HDR10, supporting a wider range of brightness and colors. This is commonly used in modern HDR displays for enhanced image quality.
Choosing the appropriate color space affects the visual quality of your application. For example, sRGB is recommended for compatibility, while HDR10 may enhance visuals in games or applications designed for HDR content.
IsFullScreen
A value indicating whether the application must render in full-screen mode (true) or inside a window (false).
public bool IsFullScreen
Field Value
PreferredBackBufferFormat
A PixelFormat specifying the display format.
public PixelFormat PreferredBackBufferFormat
Field Value
PreferredBackBufferHeight
The preferred height of the back-buffer, in pixels.
public int PreferredBackBufferHeight
Field Value
Remarks
Both PreferredBackBufferWidth and PreferredBackBufferHeight determine both the screen resolution (if in full-screen mode) or the window size (if in windowed-mode).
PreferredBackBufferWidth
The preferred width of the back-buffer, in pixels.
public int PreferredBackBufferWidth
Field Value
Remarks
Both PreferredBackBufferWidth and PreferredBackBufferHeight determine both the screen resolution (if in full-screen mode) or the window size (if in windowed-mode).
PreferredDepthStencilFormat
A PixelFormat specifying the depth-stencil format.
public PixelFormat PreferredDepthStencilFormat
Field Value
Remarks
The Depth Buffer (also known as Z-buffer) is used to determine the depth of each pixel so close geometry correctly occludes farther geometry. The format determines the precission of the depth buffer.
The Stencil Buffer is used to store additional information for each pixel, such as marking or discarding specific pixels for different effects.
This format determines both because usually the stencil buffer is a part of the depth buffer reserved for other uses.
Some examples are D24_UNorm_S8_UInt, where the depth buffer uses 24 bits and the stencil buffer uses 8 bits, for a total of 32 bits per pixel, or D32_Float, which uses 32 bits for the depth buffer and no bits for the stencil buffer.
PreferredFullScreenOutputIndex
The index of the output (monitor) to use when rendering in full-screen mode.
public int PreferredFullScreenOutputIndex
Field Value
Remarks
This output index does not have any effect when windowed mode is used (i.e. when IsFullScreen is set to false).
PreferredGraphicsProfile
An array of GraphicsProfiles ordered according to preference, where they will be tested in order from the start and the first to succeed will be selected.
public GraphicsProfile[] PreferredGraphicsProfile
Field Value
Remarks
The Graphics Profile determines which hardware and software characteristics and features are available for rendering, so it directly impacts things as performance, image quality, and graphics effects complexity. Also, higher profiles may enable advanced graphical effects but require modern hardware.
PreferredMultisampleCount
A MultisampleCount indicating the number of sample locations during multi-sampling.
public MultisampleCount PreferredMultisampleCount
Field Value
Remarks
The multi-sampling is applied to the back-buffer to reduce the aliasing artifacts. This is known as Multi-Sampling Anti-Aliasing (MSAA).
The higher the number of samples, the aliasing patterns will be less visible, but it will result in more memory being consumed, and costlier rasterization.
If None is selected, no multi-sampling will be applied. Common values include X2 (minimal anti-aliasing) and X8 (high-quality anti-aliasing). Higher values increase GPU workload.
PreferredRefreshRate
The preferred refresh rate, in hertz.
public Rational PreferredRefreshRate
Field Value
Remarks
The Refresh Rate is the number of times per second the screen is refreshed, i.e. the number of frames per second the monitor can display.
The value is represented as a Rational, so it can represent both usual integer refresh rates (e.g. 60Hz) and fractional refresh rates (e.g. 59.94Hz).
Usually, the refresh rate is only respected when rendering in full-screen mode (i.e. when IsFullScreen is set to true).
Common refresh rates include 60Hz, 120Hz, and 144Hz, depending on monitor capabilities.
RequiredAdapterUid
A value indicating whether the application should use a specific adapter (based on its AdapterUid) for rendering.
public string? RequiredAdapterUid
Field Value
Remarks
If RequiredAdapterUid is not null, the engine will try to initialize a device with the same AdapterUid.
SynchronizeWithVerticalRetrace
A value indicating whether to synchronize the presentation of the rendered frame with the vertical retrace (i.e. PreferredRefreshRate) of the monitor.
public bool SynchronizeWithVerticalRetrace
Field Value
Remarks
The synchronization with the vertical refresh, also known as V-Sync, limits the frequency of presenting frames to the screen to PreferredRefreshRate.
If enabled (true), the number of frames produced each second will be limited by the number of times the monitor can refresh its image each second.
If disabled (false), the number of frames produced each second will be unlimited. However, due to mismatch between frame generation and monitor refresh rate, an artifact known as screen tearing can occur when multiple frames are displayed simultanously. This is especially noticeable at high frame rates.