[]
IDXGISwapChain
[Guid("310d36a0-d2e7-4c0a-aa04-6a9d23b8886a")]
public class SwapChain : DeviceChild, IDisposable, IUnknown
Initializes a new instance of the SwapChain class.
public SwapChain(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
GetDescription
public SwapChainDescription Description { get; }
Gets or sets a value indicating whether the swapchain is in fullscreen.
public bool IsFullScreen { get; set; }
Creates a swap chain.
public static SwapChain Create(Factory factory, ComObject device, SwapChainDescription description)
factory
Factorya reference to a Factory.
device
ComObjectA reference to the device that will write 2D images to the swap chain.
description
SwapChainDescriptionA reference to the swap-chain description (see SwapChainDescription).
Access one of the swap-chain back buffers.
public T GetBackBuffer<T>(int index) where T : ComObject
index
intA 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 a reference to a back-buffer interface.
T
The interface of the surface to resolve from the back buffer
HRESULT IDXGISwapChain::GetBuffer([In] unsigned int Buffer,[In] const GUID& riid,[Out] void** ppSurface)
public IntPtr GetBuffer(int buffer, Guid riid)
buffer
intriid
System.GuidHRESULT IDXGISwapChain::GetContainingOutput([Out] IDXGIOutput** ppOutput)
public Output GetContainingOutput()
HRESULT IDXGISwapChain::GetDesc([Out] DXGI_SWAP_CHAIN_DESC* pDesc)
public void GetDescription(out SwapChainDescription descRef)
descRef
SwapChainDescriptionHRESULT IDXGISwapChain::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats)
public bool GetFrameStatistics(out FrameStatistics statsRef)
statsRef
FrameStatisticsHRESULT IDXGISwapChain::GetFullscreenState([Out, Optional] BOOL* pFullscreen,[Out, Optional] IDXGIOutput** ppTarget)
public void GetFullscreenState(out Bool fullscreenRef, out Output targetOut)
HRESULT IDXGISwapChain::GetLastPresentCount([Out] unsigned int* pLastPresentCount)
public int GetLastPresentCount()
HRESULT IDXGISwapChain::Present([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS Flags)
public HResult Present(int syncInterval, PresentFlags flags)
syncInterval
intflags
PresentFlagsHRESULT 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)
bufferCount
intwidth
intheight
intnewFormat
FormatswapChainFlags
SwapChainFlagsHRESULT IDXGISwapChain::ResizeTarget([In] const DXGI_MODE_DESC* pNewTargetParameters)
public void ResizeTarget(ref ModeDescription newTargetParametersRef)
newTargetParametersRef
ModeDescriptionHRESULT IDXGISwapChain::SetFullscreenState([In] BOOL Fullscreen,[In, Optional] IDXGIOutput* pTarget)
public void SetFullscreenState(Bool fullscreen, Output targetRef)
Performs an explicit conversion from System.IntPtr to SwapChain.
public static explicit operator SwapChain(IntPtr nativePointer)
nativePointer
System.IntPtr