Platform SDK: DirectX

Determining Supported Stereo View Modes

[C++]

You can determine if the hardware supports stereo view by querying for the DDCAPS2_STEREO flag. The flag is set in the dwCaps2 member of a DDCAPS structure that represents the hardware capabilities exposed by the DirectDraw object. Note that the current display mode might not be one of the display modes that support stereo view.

To determine if a specific display mode supports stereo view, you can cycle through the supported display modes using the IDirectDraw7::EnumDisplayModes method. For each display mode supported by the hardware, DirectDraw will call a callback function matching the EnumModesCallback prototype. The first argument of the callback function is the address of a DDSURFACEDESC2 structure describing one of the supported display modes. Query the dwCaps2 field of the ddsCaps member of the DDSURFACEDESC2 structure for the DDSCAPS2_STEREOSURFACELEFT flag. If the flag is present, the display mode supports stereo view.

The application can also use the IDirectDraw7::GetDisplayMode method to retrieve the current display mode and query the stereo view capabilities of the returned DDSURFACEDESC2 structure.

[Visual Basic]

You can determine if the hardware supports stereo view by querying for the DDCAPS2_STEREO flag. The flag is set in the lNLVBCaps2 member of a DDCAPS type that represents the hardware capabilities exposed by the DirectDraw object. The DDCAPS2_STEREO flag is a member of the CONST_DDCAPS2FLAGS enumeration. Note that the current display mode might not be one of the display modes that support stereo view.

To determine if a specific display mode supports stereo view, you can cycle through the supported display modes using the DirectDraw7.GetDisplayModesEnum method. This method returns a DirectDrawEnumModes object. You can call the DirectDrawEnumModes.GetItem method to return a DDSURFACEDESC2 type describing a supported display mode from the collection of supported display modes. Query the lCaps2 field of the ddsCaps member of the DDSURFACEDESC2 type for the DDSCAPS2_STEREOSURFACELEFT flag. If the flag is present, the display mode supports stereo view.

The application can also use the DirectDraw7.GetDisplayMode method to retrieve the current display mode and query the stereo view capabilities of the returned DDSURFACEDESC2 type.

For more information on enumerating display modes, see Determining Supported Display Modes.