Graphics Reference
In-Depth Information
New Project dialog to create a class library project for Windows Store apps
2. Add references to the following SharpDX assemblies:
SharpDX.dll
,
SharpDX.
D3DCompiler.dll
,
SharpDX.Direct2D1.dll
,
SharpDX.Direct3D11.dll
,
and
SharpDX.DXGI
within
.\External\Bin\DirectX11_2-Signed-winrt
.
3. Right-click on the new project; navigate to Add | Existing item...; and select
the following files from the existing
Common
project:
D3DApplicationBase.
cs
,
DeviceManager.cs
,
Mesh.cs
,
RendererBase.cs
, and
HLSLFileIncludeHandlers.hlsl
, and optionally,
FpsRenderer.cs
and
TextRenderer.cs
.
4. Instead of duplicating the files, we can choose to Add As Link within the file selection
dialog, as shown in the following screenshot:
Files can be added as a link instead of a copy
5. Any platform-specific code can be wrapped with a check for the
NETFX_CORE
definition, as shown in the following snippet:
#if NETFX_CORE
...Windows Store app code
#else
...Windows Desktop code
#endif