IDXGIFactory2 interface (dxgi1_2.h)
The IDXGIFactory2 interface includes methods to create a newer version swap chain with more features than IDXGISwapChain and to monitor stereoscopic 3D capabilities.
Inheritance
The IDXGIFactory2 interface inherits from IDXGIFactory1. IDXGIFactory2 also has these types of members:
Methods
The IDXGIFactory2 interface has these methods.
Method | Description |
---|---|
IDXGIFactory2::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. |
IDXGIFactory2::CreateSwapChainForCoreWindow | Creates a swap chain that is associated with the CoreWindow object for the output window for the swap chain. |
IDXGIFactory2::CreateSwapChainForHwnd | Creates a swap chain that is associated with an HWND handle to the output window for the swap chain. |
IDXGIFactory2::GetSharedResourceAdapterLuid | Identifies the adapter on which a shared resource object was created. |
IDXGIFactory2::IsWindowedStereoEnabled | Determines whether to use stereo mode. |
IDXGIFactory2::RegisterOcclusionStatusEvent | Registers to receive notification of changes in occlusion status by using event signaling. |
IDXGIFactory2::RegisterOcclusionStatusWindow | Registers an application window to receive notification messages of changes of occlusion status. |
IDXGIFactory2::RegisterStereoStatusEvent | Registers to receive notification of changes in stereo status by using event signaling. |
IDXGIFactory2::RegisterStereoStatusWindow | Registers an application window to receive notification messages of changes of stereo status. |
IDXGIFactory2::UnregisterOcclusionStatus | Unregisters a window or an event to stop it from receiving notification when occlusion status changes. |
IDXGIFactory2::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 | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dxgi1_2.h |