Rendering in stereo and notifying about stereo status
Apps can't render in stereo unless the operating system indicates that it enables stereoscopic 3D display behavior. Apps determine whether to render in stereoscopic 3D differently depending on whether they are windowed or full screen.
A windowed app calls the IDXGIFactory2::IsWindowedStereoEnabled method to determine whether to render in stereo. A full-screen app calls the IDXGIOutput1::GetDisplayModeList1 method and then determines whether any of the returned display modes support rendering in stereo. The GetDisplayModeList1 method does not enumerate stereo modes unless you specify the DXGI_ENUM_MODES_STEREO flag in the Flags parameter. A windowed or full-screen app that supports stereo first makes the determination to render in stereo based on a call to the IDXGIFactory2::IsWindowedStereoEnabled or IDXGIOutput1::GetDisplayModeList1 method respectively, and then registers for notification of stereo status changes. Because the app can't rely on the notification to indicate the current status of the stereoscopic 3D display behavior, when it receives a notification event or window message, it must call either IDXGIFactory2::IsWindowedStereoEnabled or IDXGIOutput1::GetDisplayModeList1 again to determine the current status of the operating system's stereoscopic 3D display behavior.
If you want to render in stereo, you must register for stereo notifications to know when the user turns off or on stereo behavior. An app can register to be notified about stereoscopic 3D status changes through a message to a window or through event signaling. To register to receive notification messages to a window about stereo status changes, an app calls the IDXGIFactory2::RegisterStereoStatusWindow method. To register to receive notification of stereo status changes via event signaling, an app calls the IDXGIFactory2::RegisterStereoStatusEvent method. Both methods return a pointer to a key value that the app can use to unregister the notification. To unregister the notification, the app passes this key value to the IDXGIFactory2::UnregisterStereoStatus method.
Stereo status can contain the following elements:
The user configuration.
Windows users can enable or disable stereo display with the enable stereoscopic 3D option in Control Panel's Change Display Settings.
The computer capability and configuration, which includes graphics adapter, graphics driver, and monitor setup.
The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.
Build date: 11/22/2012