[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DXGI.SwapChain

Class SwapChain

Namespace
GrapeCity.Documents.DX.DXGI
Assembly
GcDocs.DX.Windows.dll

IDXGISwapChain

[Guid("310d36a0-d2e7-4c0a-aa04-6a9d23b8886a")]
public class SwapChain : DeviceChild, IDisposable, IUnknown
Inheritance
object
SwapChain
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

SwapChain(IntPtr)

Initializes a new instance of the SwapChain class.

public SwapChain(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Description

GetDescription

public SwapChainDescription Description { get; }

Property Value

SwapChainDescription

IsFullScreen

Gets or sets a value indicating whether the swapchain is in fullscreen.

public bool IsFullScreen { get; set; }

Property Value

bool

Methods

Create(Factory, ComObject, SwapChainDescription)

Creates a swap chain.

public static SwapChain Create(Factory factory, ComObject device, SwapChainDescription description)

Parameters

factory Factory

a reference to a Factory.

device ComObject

A reference to the device that will write 2D images to the swap chain.

description SwapChainDescription

A reference to the swap-chain description (see SwapChainDescription).

Returns

SwapChain

GetBackBuffer<T>(int)

Access one of the swap-chain back buffers.

public T GetBackBuffer<T>(int index) where T : ComObject

Parameters

index int

A zero-based buffer index. If the swap effect is not DXGI_SWAP_EFFECT_SEQUENTIAL, this method only has access to the first buffer; for this case, set the index to zero.

Returns

T

Returns a reference to a back-buffer interface.

Type Parameters

T

The interface of the surface to resolve from the back buffer

GetBuffer(int, Guid)

HRESULT IDXGISwapChain::GetBuffer([In] unsigned int Buffer,[In] const GUID& riid,[Out] void** ppSurface)

public IntPtr GetBuffer(int buffer, Guid riid)

Parameters

buffer int
riid System.Guid

Returns

System.IntPtr

GetContainingOutput()

HRESULT IDXGISwapChain::GetContainingOutput([Out] IDXGIOutput** ppOutput)

public Output GetContainingOutput()

Returns

Output

GetDescription(out SwapChainDescription)

HRESULT IDXGISwapChain::GetDesc([Out] DXGI_SWAP_CHAIN_DESC* pDesc)

public void GetDescription(out SwapChainDescription descRef)

Parameters

descRef SwapChainDescription

GetFrameStatistics(out FrameStatistics)

HRESULT IDXGISwapChain::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats)

public bool GetFrameStatistics(out FrameStatistics statsRef)

Parameters

statsRef FrameStatistics

Returns

bool

GetFullscreenState(out Bool, out Output)

HRESULT IDXGISwapChain::GetFullscreenState([Out, Optional] BOOL* pFullscreen,[Out, Optional] IDXGIOutput** ppTarget)

public void GetFullscreenState(out Bool fullscreenRef, out Output targetOut)

Parameters

fullscreenRef Bool
targetOut Output

GetLastPresentCount()

HRESULT IDXGISwapChain::GetLastPresentCount([Out] unsigned int* pLastPresentCount)

public int GetLastPresentCount()

Returns

int

Present(int, PresentFlags)

HRESULT IDXGISwapChain::Present([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS Flags)

public HResult Present(int syncInterval, PresentFlags flags)

Parameters

syncInterval int
flags PresentFlags

Returns

HResult

ResizeBuffers(int, int, int, Format, SwapChainFlags)

HRESULT IDXGISwapChain::ResizeBuffers([In] unsigned int BufferCount,[In] unsigned int Width,[In] unsigned int Height,[In] DXGI_FORMAT NewFormat,[In] DXGI_SWAP_CHAIN_FLAG SwapChainFlags)

public void ResizeBuffers(int bufferCount, int width, int height, Format newFormat, SwapChainFlags swapChainFlags)

Parameters

bufferCount int
width int
height int
newFormat Format
swapChainFlags SwapChainFlags

ResizeTarget(ref ModeDescription)

HRESULT IDXGISwapChain::ResizeTarget([In] const DXGI_MODE_DESC* pNewTargetParameters)

public void ResizeTarget(ref ModeDescription newTargetParametersRef)

Parameters

newTargetParametersRef ModeDescription

SetFullscreenState(Bool, Output)

HRESULT IDXGISwapChain::SetFullscreenState([In] BOOL Fullscreen,[In, Optional] IDXGIOutput* pTarget)

public void SetFullscreenState(Bool fullscreen, Output targetRef)

Parameters

fullscreen Bool
targetRef Output

Operators

explicit operator SwapChain(IntPtr)

Performs an explicit conversion from System.IntPtr to SwapChain.

public static explicit operator SwapChain(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

SwapChain