IDXGIFactory2 interface
The IDXGIFactory2 interface includes methods to create a newer version swap chain with more features than IDXGISwapChain and to monitor stereoscopic 3D capabilities.
Members
The IDXGIFactory2 interface inherits from IDXGIFactory1. IDXGIFactory2 also has these types of members:
Methods
The IDXGIFactory2 interface has these methods.
| Method | Description |
|---|---|
| CreateSwapChainForComposition |
Creates a swap chain that you can use to send Direct3D content into the DirectComposition API or the Windows.UI.Xaml framework to compose in a window. |
| CreateSwapChainForCoreWindow |
Creates a swap chain that is associated with the CoreWindow object for the output window for the swap chain. |
| CreateSwapChainForHwnd |
Creates a swap chain that is associated with an HWND handle to the output window for the swap chain. |
| GetSharedResourceAdapterLuid |
Identifies the adapter on which a shared resource object was created. |
| IsWindowedStereoEnabled |
Determines whether to use stereo mode. |
| RegisterOcclusionStatusEvent |
Registers to receive notification of changes in occlusion status by using event signaling. |
| RegisterOcclusionStatusWindow |
Registers an application window to receive notification messages of changes of occlusion status. |
| RegisterStereoStatusEvent |
Registers to receive notification of changes in stereo status by using event signaling. |
| RegisterStereoStatusWindow |
Registers an application window to receive notification messages of changes of stereo status. |
| UnregisterOcclusionStatus |
Unregisters a window or an event to stop it from receiving notification when occlusion status changes. |
| UnregisterStereoStatus |
Unregisters a window or an event to stop it from receiving notification when stereo status changes. |
Remarks
To create a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 factory interface, pass IDXGIFactory2 into either the CreateDXGIFactory or CreateDXGIFactory1 function or call QueryInterface from a factory object that either CreateDXGIFactory or CreateDXGIFactory1 returns.
Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the IDXGIDevice, IDXGIDevice1, or IDXGIDevice2 interface from the Direct3D device and then use the IDXGIObject::GetParent method to locate the factory. The following code shows how.
IDXGIDevice2 * pDXGIDevice;
hr = g_pd3dDevice->QueryInterface(__uuidof(IDXGIDevice2), (void **)&pDXGIDevice);
IDXGIAdapter * pDXGIAdapter;
hr = pDXGIDevice->GetParent(__uuidof(IDXGIAdapter), (void **)&pDXGIAdapter);
IDXGIFactory2 * pIDXGIFactory;
pDXGIAdapter->GetParent(__uuidof(IDXGIFactory2), (void **)&pIDXGIFactory);
Requirements
|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Minimum supported phone | Windows Phone 8 |
|
Header |
|
|
Library |
|
See also

