Class DxgiSwapChain3
Extends IDXGISwapChain1
with methods to support swap back buffer scaling and lower-latency swap chains.
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
public sealed class DxgiSwapChain3 : DxgiDeviceSubObject, IDisposable, IDxgiReleasable
Properties
| Edit this page View SourceBackgroundColor
Gets or sets the background color of the swap chain.
Declaration
public DxgiColorRgba BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
DxgiColorRgba |
Description
Gets a description of the swap chain.
Declaration
public DxgiSwapChainDesc1 Description { get; }
Property Value
Type | Description |
---|---|
DxgiSwapChainDesc1 |
FrameStatistics
Gets performance statistics about the last render frame.
Declaration
public DxgiFrameStatistics FrameStatistics { get; }
Property Value
Type | Description |
---|---|
DxgiFrameStatistics |
FullscreenDescription
Gets a description of a full-screen swap chain.
Declaration
public DxgiSwapChainFullscreenDesc FullscreenDescription { get; }
Property Value
Type | Description |
---|---|
DxgiSwapChainFullscreenDesc |
Handle
Gets an handle representing the DXGI object interface.
Declaration
public override object Handle { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
| Edit this page View SourceIsTemporaryMonoSupported
Gets a value indicating whether a swap chain supports “temporary mono.”
Declaration
public bool IsTemporaryMonoSupported { get; }
Property Value
Type | Description |
---|---|
bool |
LastPresentCount
Gets the number of times that IDXGISwapChain::Present
or IDXGISwapChain1::Present1
has been called.
Declaration
public uint LastPresentCount { get; }
Property Value
Type | Description |
---|---|
uint |
MatrixTransform
Gets or sets the transform matrix that will be applied to a composition swap chain upon the next present.
Declaration
public DxgiMatrix3x2F MatrixTransform { get; set; }
Property Value
Type | Description |
---|---|
DxgiMatrix3x2F |
MaximumFrameLatency
Gets or sets the number of frames that the swap chain is allowed to queue for rendering.
Declaration
public uint MaximumFrameLatency { get; set; }
Property Value
Type | Description |
---|---|
uint |
Rotation
Gets or sets the rotation of the back buffers for the swap chain.
Declaration
public DxgiModeRotation Rotation { get; set; }
Property Value
Type | Description |
---|---|
DxgiModeRotation |
WindowHandle
Gets the underlying HWND
for this swap-chain object.
Declaration
public nint WindowHandle { get; }
Property Value
Type | Description |
---|---|
nint |
Methods
| Edit this page View SourceGetBuffer(uint, Guid)
Accesses one of the swap-chain's back buffers.
Declaration
public object GetBuffer(uint buffer, Guid riid)
Parameters
Type | Name | Description |
---|---|---|
uint | buffer | A zero-based buffer index. |
Guid | riid | The type of interface used to manipulate the buffer. |
Returns
Type | Description |
---|---|
object | A pointer to a back-buffer interface. |
GetContainingOutput()
Get the output (the display monitor) that contains the majority of the client area of the target window.
Declaration
public DxgiOutput3 GetContainingOutput()
Returns
Type | Description |
---|---|
DxgiOutput3 | The output interface. |
GetFullscreenState()
Get the state associated with full-screen mode.
Declaration
public bool GetFullscreenState()
Returns
Type | Description |
---|---|
bool | A value indicating whether to set the display state to windowed or full screen. |
GetFullscreenState(out DxgiOutput3)
Get the state associated with full-screen mode.
Declaration
public bool GetFullscreenState(out DxgiOutput3 target)
Parameters
Type | Name | Description |
---|---|---|
DxgiOutput3 | target | The output target when the mode is full screen. |
Returns
Type | Description |
---|---|
bool | A value indicating whether to set the display state to windowed or full screen. |
GetRestrictToOutput()
Gets the output (the display monitor) to which you can restrict the contents of a present operation.
Declaration
public DxgiOutput3 GetRestrictToOutput()
Returns
Type | Description |
---|---|
DxgiOutput3 | The |
GetSourceSize(out uint, out uint)
Gets the source region used for the swap chain.
Declaration
public void GetSourceSize(out uint width, out uint height)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The current width of the source region of the swap chain. This value can range from 1 to the overall width of the swap chain. |
uint | height | The current height of the source region of the swap chain. This value can range from 1 to the overall height of the swap chain. |
GetSurface(uint)
Accesses one of the swap-chain's back buffers.
Declaration
public DxgiSurface3 GetSurface(uint buffer)
Parameters
Type | Name | Description |
---|---|---|
uint | buffer | A zero-based buffer index. |
Returns
Type | Description |
---|---|
DxgiSurface3 | A back-buffer surface. |
Present(uint, DxgiPresentOptions)
Presents a frame on the display screen.
Declaration
public void Present(uint syncInterval, DxgiPresentOptions options)
Parameters
Type | Name | Description |
---|---|---|
uint | syncInterval | An integer that specifies how to synchronize presentation of a frame with the vertical blank. |
DxgiPresentOptions | options | An integer value that contains swap-chain presentation options. |
Present(uint, DxgiPresentOptions, DxgiRect[], DxgiRect, DxgiPoint)
Presents a frame on the display screen.
Declaration
public void Present(uint syncInterval, DxgiPresentOptions options, DxgiRect[] dirtyRects, DxgiRect scrollRect, DxgiPoint scrollOffset)
Parameters
Type | Name | Description |
---|---|---|
uint | syncInterval | An integer that specifies how to synchronize presentation of a frame with the vertical blank. |
DxgiPresentOptions | options | An integer value that contains swap-chain presentation options. |
DxgiRect[] | dirtyRects | A list of updated rectangles that you update in the back buffer for the presented frame. |
DxgiRect | scrollRect | The rectangle of the previous frame from which the runtime bit-block transfers content. |
DxgiPoint | scrollOffset | The offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). |
ResizeBuffers(uint, uint, uint, DxgiFormat, DxgiSwapChainOptions)
Changes the swap chain's back buffer size, format, and number of buffers. This should be called when the application window is resized.
Declaration
public void ResizeBuffers(uint bufferCount, uint width, uint height, DxgiFormat format, DxgiSwapChainOptions options)
Parameters
Type | Name | Description |
---|---|---|
uint | bufferCount | The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. |
uint | width | New width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. |
uint | height | New height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. |
DxgiFormat | format | A |
DxgiSwapChainOptions | options | The options for swap-chain behavior. |
ResizeTarget(DxgiModeDesc)
Resizes the output target.
Declaration
public void ResizeTarget(DxgiModeDesc targetParameters)
Parameters
Type | Name | Description |
---|---|---|
DxgiModeDesc | targetParameters | A |
SetFullscreenState(bool)
Sets the display state to windowed or full screen.
Declaration
public void SetFullscreenState(bool fullscreen)
Parameters
Type | Name | Description |
---|---|---|
bool | fullscreen | A value indicating whether to set the display state to windowed or full screen. |
SetFullscreenState(bool, DxgiOutput3)
Sets the display state to windowed or full screen.
Declaration
public void SetFullscreenState(bool fullscreen, DxgiOutput3 target)
Parameters
Type | Name | Description |
---|---|---|
bool | fullscreen | A value indicating whether to set the display state to windowed or full screen. |
DxgiOutput3 | target | A pointer to an |
SetSourceSize(uint, uint)
Sets the source region to be used for the swap chain.
Declaration
public void SetSourceSize(uint width, uint height)
Parameters
Type | Name | Description |
---|---|---|
uint | width | Source width to use for the swap chain. This value must be greater than zero, and must be less than or equal to the overall width of the swap chain. |
uint | height | Source height to use for the swap chain. This value must be greater than zero, and must be less than or equal to the overall height of the swap chain. |