Class DxgiFactory
An IDXGIFactory interface implements methods for generating DXGI objects (which handle full screen transitions).
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.Dxgi
Assembly: JeremyAnsel.DirectX.Dxgi.dll
Syntax
[SecurityCritical]
public class DxgiFactory : DxgiObject, IDisposable
Constructors
| Edit this page View SourceDxgiFactory(nint)
Initializes a new instance of the DxgiFactory class.
Declaration
public DxgiFactory(nint comPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | comPtr |
Fields
| Edit this page View SourceDxgiFactoryGuid
The interface GUID.
Declaration
public static readonly Guid DxgiFactoryGuid
Field Value
| Type | Description |
|---|---|
| Guid |
Properties
| Edit this page View SourceWindowAssociation
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.0 factory that you can use to generate other DXGI objects.
Declaration
public static DxgiFactory Create()
Returns
| Type | Description |
|---|---|
| DxgiFactory | A DxgiFactory object. |
CreateSoftwareAdapter(nint)
Create an adapter interface that represents a software adapter.
Declaration
public DxgiAdapter CreateSoftwareAdapter(nint module)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | module | Handle to the software adapter's dll. |
Returns
| Type | Description |
|---|---|
| DxgiAdapter | An adapter. |
CreateSwapChain(DXComObject, in DxgiSwapChainDesc)
Creates a swap chain.
Declaration
public DxgiSwapChain CreateSwapChain(DXComObject device, in DxgiSwapChainDesc desc)
Parameters
| Type | Name | Description |
|---|---|---|
| DXComObject | device | A Direct3D device that will write 2D images to the swap chain. |
| DxgiSwapChainDesc | desc | A |
Returns
| Type | Description |
|---|---|
| DxgiSwapChain | An |
CreateSwapChain(nint, in DxgiSwapChainDesc)
Creates a swap chain.
Declaration
public DxgiSwapChain CreateSwapChain(nint device, in DxgiSwapChainDesc desc)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | device | A Direct3D device that will write 2D images to the swap chain. |
| DxgiSwapChainDesc | desc | A |
Returns
| Type | Description |
|---|---|
| DxgiSwapChain | An |
EnumAdapters()
Enumerates the adapters (video cards).
Declaration
public IEnumerable<DxgiAdapter> EnumAdapters()
Returns
| Type | Description |
|---|---|
| IEnumerable<DxgiAdapter> | An IEnumerable of DxgiAdapter. |
EnumAdapters(uint)
Enumerates the adapters (video cards).
Declaration
public DxgiAdapter? EnumAdapters(uint i)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | i |
Returns
| Type | Description |
|---|---|
| DxgiAdapter | An adapter or null |
GetAdapter(uint)
Enumerates the adapters (video cards).
Declaration
public DxgiAdapter GetAdapter(uint i)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | i |
Returns
| Type | Description |
|---|---|
| DxgiAdapter | An adapter |
GetAdapterCount()
Get the adapter count (video cards).
Declaration
public int GetAdapterCount()
Returns
| Type | Description |
|---|---|
| int |
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. |