[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DXGI.Factory

Class Factory

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

IDXGIFactory

[Guid("7b7166ec-21c7-44ae-b21a-c9ae321ae369")]
public class Factory : DXGIObject, IDisposable, IUnknown
Inheritance
Factory
Implements
Derived
Inherited Members

Constructors

Factory(IntPtr)

Initializes a new instance of the Factory class.

public Factory(IntPtr nativePtr)

Parameters

nativePtr IntPtr

The native pointer.

Properties

Adapters

Return an array of Adapter available from this factory.

public Adapter[] Adapters { get; }

Property Value

Adapter[]

Methods

CreateSoftwareAdapter(IntPtr)

HRESULT IDXGIFactory::CreateSoftwareAdapter([In] HINSTANCE Module,[Out] IDXGIAdapter** ppAdapter)

public Adapter CreateSoftwareAdapter(IntPtr module)

Parameters

module IntPtr

Returns

Adapter

CreateSwapChain(ComObject, ref SwapChainDescription)

HRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out, Fast] IDXGISwapChain** ppSwapChain)

public SwapChain CreateSwapChain(ComObject deviceRef, ref SwapChainDescription descRef)

Parameters

deviceRef ComObject
descRef SwapChainDescription

Returns

SwapChain

GetAdapter(int)

Gets both adapters (video cards) with or without outputs.

public Adapter GetAdapter(int index)

Parameters

index int

The index of the adapter to enumerate.

Returns

Adapter

a reference to an Adapter interface at the position specified by the Adapter parameter

Remarks

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.

GetAdapter(int, out Adapter)

HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter)

public HResult GetAdapter(int adapter, out Adapter adapterOut)

Parameters

adapter int
adapterOut Adapter

Returns

HResult

GetAdapterCount()

Return the number of available adapters from this factory.

public int GetAdapterCount()

Returns

int

The number of adapters

GetWindowAssociation()

HRESULT IDXGIFactory::GetWindowAssociation([Out] HWND* pWindowHandle)

public IntPtr GetWindowAssociation()

Returns

IntPtr

MakeWindowAssociation(IntPtr, WindowAssociationFlags)

HRESULT IDXGIFactory::MakeWindowAssociation([In] HWND WindowHandle,[In] DXGI_MWA_FLAGS Flags)

public void MakeWindowAssociation(IntPtr windowHandle, WindowAssociationFlags flags)

Parameters

windowHandle IntPtr
flags WindowAssociationFlags

Operators

explicit operator Factory(IntPtr)

Performs an explicit conversion from IntPtr to Factory.

public static explicit operator Factory(IntPtr nativePointer)

Parameters

nativePointer IntPtr

Returns

Factory