Class DxgiFactory2
The IDXGIFactory2 interface includes methods to create a newer version swap chain with more features than IDXGISwapChain and to monitor stereoscopic 3D capabilities.
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
public sealed class DxgiFactory2 : DxgiObject, IDisposable, IDxgiReleasable
Properties
| Edit this page View SourceHandle
Gets an handle representing the DXGI object interface.
Declaration
public override object Handle { get; }
Property Value
| Type | Description |
|---|---|
| object |
Overrides
| Edit this page View SourceIsCurrent
Gets a value indicating whether the adapter has not changed.
Declaration
public bool IsCurrent { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsWindowedStereoEnabled
Gets a value indicating whether to use stereo mode.
Declaration
public bool IsWindowedStereoEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
WindowAssociation
Gets the window through which the user controls the transition to and from full screen.
Declaration
public nint WindowAssociation { get; }
Property Value
| Type | Description |
|---|---|
| nint |
Methods
| Edit this page View SourceCreate()
Creates a DXGI 1.2 factory that you can use to generate other DXGI objects.
Declaration
public static DxgiFactory2? Create()
Returns
| Type | Description |
|---|---|
| DxgiFactory2 | A DxgiFactory2 object. |
CreateSwapChainForWindowHandle(object?, nint, DxgiSwapChainDesc1, DxgiSwapChainFullscreenDesc?, DxgiOutput2?)
Creates a swap chain that is associated with an HWND handle to the output window for the swap chain.
Declaration
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Reliability", "CA2000:Supprimer les objets avant la mise hors de portée", Justification = "Reviewed")]
public DxgiSwapChain2? CreateSwapChainForWindowHandle(object? device, nint hwnd, DxgiSwapChainDesc1 desc, DxgiSwapChainFullscreenDesc? fullscreenDesc, DxgiOutput2? restrictToOutput)
Parameters
| Type | Name | Description |
|---|---|---|
| object | device | The Direct3D device for the swap chain. |
| nint | hwnd | The |
| DxgiSwapChainDesc1 | desc | A |
| DxgiSwapChainFullscreenDesc? | fullscreenDesc | A |
| DxgiOutput2 | restrictToOutput | The |
Returns
| Type | Description |
|---|---|
| DxgiSwapChain2 | The |
EnumAdapters()
Enumerates both adapters (video cards) with or without outputs.
Declaration
public IEnumerable<DxgiAdapter2?> EnumAdapters()
Returns
| Type | Description |
|---|---|
| IEnumerable<DxgiAdapter2> | An IEnumerable of DxgiAdapter2. |
MakeWindowAssociation(nint, DxgiWindowAssociationOptions)
Allows DXGI to monitor an application's message queue for the alt-enter key sequence (which causes the application to switch from windowed to full screen or vice versa).
Declaration
public void MakeWindowAssociation(nint windowHandle, DxgiWindowAssociationOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | windowHandle | The handle of the window that is to be monitored. This parameter can be |
| DxgiWindowAssociationOptions | options | One or more options. |