Show / Hide Table of Contents

Struct GraphicsDeviceOptions

A structure describing several common properties of a GraphicsDevice.

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct GraphicsDeviceOptions

Constructors

GraphicsDeviceOptions(Boolean)

Constructs a new GraphicsDeviceOptions for a device with no main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will support debug features, provided they are supported by the host system.

GraphicsDeviceOptions(Boolean, Nullable<PixelFormat>, Boolean)

Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool syncToVerticalBlank)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will enable debug features, provided they are supported by the host system.

System.Nullable<PixelFormat> swapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

System.Boolean syncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

GraphicsDeviceOptions(Boolean, Nullable<PixelFormat>, Boolean, ResourceBindingModel)

Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool syncToVerticalBlank, ResourceBindingModel resourceBindingModel)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will enable debug features, provided they are supported by the host system.

System.Nullable<PixelFormat> swapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

System.Boolean syncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

ResourceBindingModel resourceBindingModel

Specifies which model the rendering backend should use for binding resources.

GraphicsDeviceOptions(Boolean, Nullable<PixelFormat>, Boolean, ResourceBindingModel, Boolean)

Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool syncToVerticalBlank, ResourceBindingModel resourceBindingModel, bool preferDepthRangeZeroToOne)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will enable debug features, provided they are supported by the host system.

System.Nullable<PixelFormat> swapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

System.Boolean syncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

ResourceBindingModel resourceBindingModel

Specifies which model the rendering backend should use for binding resources.

System.Boolean preferDepthRangeZeroToOne

Indicates whether a 0-to-1 depth range mapping is preferred. For OpenGL, this is not the default, and is not available on all systems.

GraphicsDeviceOptions(Boolean, Nullable<PixelFormat>, Boolean, ResourceBindingModel, Boolean, Boolean)

Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool syncToVerticalBlank, ResourceBindingModel resourceBindingModel, bool preferDepthRangeZeroToOne, bool preferStandardClipSpaceYDirection)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will enable debug features, provided they are supported by the host system.

System.Nullable<PixelFormat> swapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

System.Boolean syncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

ResourceBindingModel resourceBindingModel

Specifies which model the rendering backend should use for binding resources.

System.Boolean preferDepthRangeZeroToOne

Indicates whether a 0-to-1 depth range mapping is preferred. For OpenGL, this is not the default, and is not available on all systems.

System.Boolean preferStandardClipSpaceYDirection

Indicates whether a bottom-to-top-increasing clip space Y direction is preferred. For Vulkan, this is not the default, and is not available on all systems.

GraphicsDeviceOptions(Boolean, Nullable<PixelFormat>, Boolean, ResourceBindingModel, Boolean, Boolean, Boolean)

Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.

Declaration
public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool syncToVerticalBlank, ResourceBindingModel resourceBindingModel, bool preferDepthRangeZeroToOne, bool preferStandardClipSpaceYDirection, bool swapchainSrgbFormat)
Parameters
Type Name Description
System.Boolean debug

Indicates whether the GraphicsDevice will enable debug features, provided they are supported by the host system.

System.Nullable<PixelFormat> swapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

System.Boolean syncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

ResourceBindingModel resourceBindingModel

Specifies which model the rendering backend should use for binding resources.

System.Boolean preferDepthRangeZeroToOne

Indicates whether a 0-to-1 depth range mapping is preferred. For OpenGL, this is not the default, and is not available on all systems.

System.Boolean preferStandardClipSpaceYDirection

Indicates whether a bottom-to-top-increasing clip space Y direction is preferred. For Vulkan, this is not the default, and is not available on all systems.

System.Boolean swapchainSrgbFormat

Indicates whether the main Swapchain should use an sRGB format. This value is only used in cases where the properties of the main SwapChain are not explicitly specified with a SwapchainDescription. If they are, then the value of ColorSrgb will supercede the value specified here.

Fields

Debug

Indicates whether the GraphicsDevice will support debug features, provided they are supported by the host system.

Declaration
public bool Debug
Field Value
Type Description
System.Boolean

HasMainSwapchain

Indicates whether the Graphicsdevice will include a "main" Swapchain. If this value is true, then the GraphicsDevice must be created with one of the overloads that provides Swapchain source information.

Declaration
public bool HasMainSwapchain
Field Value
Type Description
System.Boolean

PreferDepthRangeZeroToOne

Indicates whether a 0-to-1 depth range mapping is preferred. For OpenGL, this is not the default, and is not available on all systems.

Declaration
public bool PreferDepthRangeZeroToOne
Field Value
Type Description
System.Boolean

PreferStandardClipSpaceYDirection

Indicates whether a bottom-to-top-increasing clip space Y direction is preferred. For Vulkan, this is not the default, and may not be available on all systems.

Declaration
public bool PreferStandardClipSpaceYDirection
Field Value
Type Description
System.Boolean

ResourceBindingModel

Specifies which model the rendering backend should use for binding resources. This can be overridden per-pipeline by specifying a value in ResourceBindingModel.

Declaration
public ResourceBindingModel ResourceBindingModel
Field Value
Type Description
ResourceBindingModel

SwapchainDepthFormat

An optional PixelFormat to be used for the depth buffer of the swapchain. If this value is null, then no depth buffer will be present on the swapchain.

Declaration
public PixelFormat? SwapchainDepthFormat
Field Value
Type Description
System.Nullable<PixelFormat>

SwapchainSrgbFormat

Indicates whether the main Swapchain should use an sRGB format. This value is only used in cases where the properties of the main SwapChain are not explicitly specified with a SwapchainDescription. If they are, then the value of ColorSrgb will supercede the value specified here.

Declaration
public bool SwapchainSrgbFormat
Field Value
Type Description
System.Boolean

SyncToVerticalBlank

Indicates whether the main Swapchain will be synchronized to the window system's vertical refresh rate.

Declaration
public bool SyncToVerticalBlank
Field Value
Type Description
System.Boolean
Back to top