Graphics Reference
In-Depth Information
3.
You should now have a new Blank Solution at C:\Projects\D3DRendering\
D3DRendering.sln .
4.
Extract the contents of the SharpDX package into C:\Projects\D3DRendering\
External . The C:\Projects\D3DRendering\External\Bin folder should
now exist among others.
How to do it…
With the solution open, let's create a new project:
1.
Add a new Windows Form Application project to the solution with .NET
Framework 4.5 selected.
2.
We will name the project Ch01_01EmptyProject .
3.
Add the SharpDX references to the project by selecting the project in the solution
explorer and then navigate to PROJECT | Add Reference from the main menu.
Now click on the Browse option on the left and click on the Browse... button in
Reference Manager.
4.
For a Direct3D 11.1 project compatible with Windows 7, Windows 8, and Windows
8.1, navigate to C:\Projects\D3DRendering\External\Bin\DirectX11_1-
net40 and select SharpDX.dll, SharpDX.DXGI.dll, and SharpDX.Direct3D11.dll.
5.
For a Direct3D 11.2 project compatible only with Windows 8.1, navigate to C:\
Projects\D3DRendering\External\Bin\DirectX11_2-net40 and add the
same references located there.
SharpDX.dll, SharpDX.DXGI.dll, and SharpDX.Direct3D11.dll are the minimum
references required to create Direct3D 11 applications with SharpDX.
6.
Click on Ok in Reference Manager to accept the changes.
7.
Add the following using directives to Program.cs :
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;
 
Search WWH ::




Custom Search