Show / Hide Table of Contents

Struct SwapchainDescription

Describes a Swapchain, for creation via a ResourceFactory.

Implements
System.IEquatable<SwapchainDescription>
Inherited Members
System.ValueType.Equals(System.Object)
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 SwapchainDescription : IEquatable<SwapchainDescription>

Constructors

SwapchainDescription(SwapchainSource, UInt32, UInt32, Nullable<PixelFormat>, Boolean)

Constructs a new SwapchainDescription.

Declaration
public SwapchainDescription(SwapchainSource source, uint width, uint height, PixelFormat? depthFormat, bool syncToVerticalBlank)
Parameters
Type Name Description
SwapchainSource source

The SwapchainSource which will be used as the target of rendering operations. This is a window-system-specific object which differs by platform.

System.UInt32 width

The initial width of the Swapchain surface.

System.UInt32 height

The initial height of the Swapchain surface.

System.Nullable<PixelFormat> depthFormat

The optional format of the depth target of the Swapchain's Framebuffer. If non-null, this must be a valid depth Texture format. If null, then no depth target will be created.

System.Boolean syncToVerticalBlank

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

SwapchainDescription(SwapchainSource, UInt32, UInt32, Nullable<PixelFormat>, Boolean, Boolean)

Constructs a new SwapchainDescription.

Declaration
public SwapchainDescription(SwapchainSource source, uint width, uint height, PixelFormat? depthFormat, bool syncToVerticalBlank, bool colorSrgb)
Parameters
Type Name Description
SwapchainSource source

The SwapchainSource which will be used as the target of rendering operations. This is a window-system-specific object which differs by platform.

System.UInt32 width

The initial width of the Swapchain surface.

System.UInt32 height

The initial height of the Swapchain surface.

System.Nullable<PixelFormat> depthFormat

The optional format of the depth target of the Swapchain's Framebuffer. If non-null, this must be a valid depth Texture format. If null, then no depth target will be created.

System.Boolean syncToVerticalBlank

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

System.Boolean colorSrgb

Indicates whether the color target of the Swapchain will use an sRGB PixelFormat.

Fields

ColorSrgb

Indicates whether the color target of the Swapchain will use an sRGB PixelFormat.

Declaration
public bool ColorSrgb
Field Value
Type Description
System.Boolean

DepthFormat

The optional format of the depth target of the Swapchain's Framebuffer. If non-null, this must be a valid depth Texture format. If null, then no depth target will be created.

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

Height

The initial height of the Swapchain surface.

Declaration
public uint Height
Field Value
Type Description
System.UInt32

Source

The SwapchainSource which will be used as the target of rendering operations. This is a window-system-specific object which differs by platform.

Declaration
public SwapchainSource Source
Field Value
Type Description
SwapchainSource

SyncToVerticalBlank

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

Declaration
public bool SyncToVerticalBlank
Field Value
Type Description
System.Boolean

Width

The initial width of the Swapchain surface.

Declaration
public uint Width
Field Value
Type Description
System.UInt32

Methods

Equals(SwapchainDescription)

Element-wise equality.

Declaration
public bool Equals(SwapchainDescription other)
Parameters
Type Name Description
SwapchainDescription other

The instance to compare to.

Returns
Type Description
System.Boolean

True if all elements are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer that is the hash code for this instance.

Overrides
System.ValueType.GetHashCode()

Implements

System.IEquatable<T>
Back to top