Graphics Reference
In-Depth Information
SharpDX.DXGI.SwapChain1 includes support for stereoscopic 3D display and supports
WinRT and Windows Phone 8 development.
The Direct3D 11.2 API is only available on Windows 8.1.
Getting ready
First we will create a new Windows Form Application project named Ch01_02Direct3D11_1
in our D3DRendering.sln solution.
Now add the SharpDX references as outlined in the previous recipe, choosing the appropriate
version - Building a Direct3D 11 application with C# and SharpDX.
Set the new project as the startup project by right-clicking on the project in the solution
explorer and click on Set as StartUp Project.
For Windows 7/Windows Server 2008 R2 users, this recipe
requires that you have installed the platform update for Windows
7 Service Pack 1/Windows Server 2008 R2 SP1.
It is not possible to use the Direct3D 11.2 API with Windows 7,
as this version is available to Windows 8.1 only.
How to do it…
We'll begin by creating the Direct3D 11 device as done in the previous recipe and then
query the object for an implementation of the Direct3D 11.1 Device1 COM interface.
1.
Open Program.cs and add the using directives from the previous recipe along
with one additional alias:
using SharpDX;
using SharpDX.Windows;
using SharpDX.DXGI;
using SharpDX.Direct3D11;
// Resolve name conflicts by explicitly stating the class to use:
using Device = SharpDX.Direct3D11.Device;
using Device1 = SharpDX.Direct3D11.Device1;
2.
Now copy the contents of the Main() method from the previous recipe.
 
Search WWH ::




Custom Search