Skip to content

Vital-Volkov/Remake-of-Direct3D11-native-stereoscopic-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remake of Direct3D11.1 native stereoscopic sample

Added my precision S3D settings system and forced stereo3D On/Off independent of 3D display mode in Display settings->Advanced Display Settings
Tested working on my LG D2342P monitor with NVidia 452.06 and 3D Vision driver installed separately by 3D Fix Manager 1.85
Also should work with active S3D hardware and shutter glasses so give me feedback how it go.

This branch is upgraded to Visual Studio 2019 and also compiled AppPackage included so you can install it and test S3D without Visual Studio just click on Install.ps1 file with right mouse button and select Run with PowerShell and follow onscreen instructions. After installation you can run the Direct3D stereoscopic 3D C++ sample program from the Windows start menu.

Screenshot
Below is a copy of the original Microsoft readme:

Direct3D stereoscopic 3D sample

Requires

  • Visual Studio 2019

License

  • MS-LPL

Technologies

  • DirectX

Topics

  • Audio and video

Updated

  • 11/25/2013

Description

This sample demonstrates how to add a stereoscopic 3-D effect to C++ apps by using Direct3D. It also demonstrates how to respond to system stereo changes in Direct3D.

Note  The stereoscopic 3-D effect requires a display that supports stereo 3-D.

You can use the code in this sample to add stereoscopic 3-D effects to your Direct3D 11.1 app. It shows the best practices and usage of stereo 3-D support APIs that Direct3D 11.1 supports for apps.

The process demonstrated in this sample is as follows:

  • Call IDXGIFactory2::IsWindowedStereoEnabled to verify that the computer on which the app runs supports stereo 3-D.
  • Use the following code to register for StereoEnabledChanged notifications whenever the stereo 3D support on the computer changes. The DisplayPropertiesEventHandler delegate handles these notifications. These are Windows Runtime APIs from the Windows.Graphics.Display namespace.
    DisplayProperties::StereoEnabledChanged +=
         ref new DisplayPropertiesEventHandler(this, &View::OnStereoEnableChanged);
  • Create the device with the feature level set at least at the minimum requirement for stereo 3-D support, that is, a Direct3D 11.1 device with feature level 10.0 or higher.
  • Create stereo 3-D supported swap chains on which to render stereo content for left and right eye views.
  • Create and set stereo projection matrices for rendering stereo content.
  • Set up rendering state and pipeline for rendering stereo content; that is, left and right render-target views.
  • Render Direct2D content on the stereo 3-D swap chain. That is, obtain the back buffer of a swap chain as a DXGI resource and call the IDXGIResource1::CreateSubresourceSurface API to obtain the left and right views.

For more info about the concepts and APIs demonstrated in this sample, see these topics:

This sample is written in C++ and requires some experience with graphics programming and DirectX.

Requirements

In addition to the minimum supported operating systems being Windows 8.1 and Windows Server 2012 R2, a WDDM 1.2 display driver must be installed on the computer, and the graphics hardware must support feature level 10 or higher.

To obtain an evaluation copy of Windows 8.1, go to Windows 8.1.

To obtain an evaluation copy of Microsoft Visual Studio 2013, go to Visual Studio 2013.

Related topics

Windows 8 app samples

Operating system requirements

Client
Windows 10
Server
Windows Server 2016

Build the sample

  1. Start Visual Studio 2019 and select File > Open > Project/Solution.
  2. Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Visual Studio 2019 Solution (.sln) file.
  3. Press F7 or use Build > Build Solution to build the sample.

Run the sample

To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.

You can adjust the stereoscopic visual effect by pressing the 'up' or 'down' arrow keys.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published