[]
IDXGIFactory
[Guid("7b7166ec-21c7-44ae-b21a-c9ae321ae369")]
public class Factory : DXGIObject, IDisposable, IUnknown
Initializes a new instance of the Factory class.
public Factory(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Return an array of Adapter available from this factory.
public Adapter[] Adapters { get; }
HRESULT IDXGIFactory::CreateSoftwareAdapter([In] HINSTANCE Module,[Out] IDXGIAdapter** ppAdapter)
public Adapter CreateSoftwareAdapter(IntPtr module)
module
System.IntPtrHRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out, Fast] IDXGISwapChain** ppSwapChain)
public SwapChain CreateSwapChain(ComObject deviceRef, ref SwapChainDescription descRef)
deviceRef
ComObjectdescRef
SwapChainDescriptionHRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter)
public HResult GetAdapter(int adapter, out Adapter adapterOut)
adapter
intadapterOut
AdapterGets both adapters (video cards) with or without outputs.
public Adapter GetAdapter(int index)
index
intThe index of the adapter to enumerate.
When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the Factory object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.When the EnumAdapters method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.EnumAdapters first returns the local adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters then returns other adapters with outputs.
Return the number of available adapters from this factory.
public int GetAdapterCount()
The number of adapters
HRESULT IDXGIFactory::GetWindowAssociation([Out] HWND* pWindowHandle)
public IntPtr GetWindowAssociation()
HRESULT IDXGIFactory::MakeWindowAssociation([In] HWND WindowHandle,[In] DXGI_MWA_FLAGS Flags)
public void MakeWindowAssociation(IntPtr windowHandle, WindowAssociationFlags flags)
windowHandle
System.IntPtrflags
WindowAssociationFlagsPerforms an explicit conversion from System.IntPtr to Factory.
public static explicit operator Factory(IntPtr nativePointer)
nativePointer
System.IntPtr