updated ANX.RenderSystem.Windows.DX11 to use NuGet for SharpDX dependencies

updated ANX.RenderSystem.Windows.DX11 to compile with SharpDX 2.4.2
This commit is contained in:
Glatzemann 2013-07-23 10:58:07 +00:00 committed by Konstantin Koch
parent aa75274bab
commit 1f1055e66f
8 changed files with 40 additions and 23 deletions

View File

@ -45,27 +45,29 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="SharpDX, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SharpDX, Version=2.4.2.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\SharpDX\Bin\Standard-net20\SharpDX.dll</HintPath> <HintPath>..\..\packages\SharpDX.2.4.2\lib\net40\SharpDX.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpDX.D3DCompiler, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SharpDX.D3DCompiler, Version=2.4.2.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\SharpDX\Bin\Standard-net20\SharpDX.D3DCompiler.dll</HintPath> <HintPath>..\..\packages\SharpDX.D3DCompiler.2.4.2\lib\net40\SharpDX.D3DCompiler.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpDX.Direct3D11, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SharpDX.Direct3D11, Version=2.4.2.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\SharpDX\Bin\Standard-net20\SharpDX.Direct3D11.dll</HintPath> <HintPath>..\..\packages\SharpDX.Direct3D11.2.4.2\lib\net40\SharpDX.Direct3D11.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpDX.Direct3D11.Effects"> <Reference Include="SharpDX.Direct3D11.Effects, Version=2.4.2.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
<HintPath>..\..\lib\SharpDX\Bin\Standard-net20\SharpDX.Direct3D11.Effects.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DXGI, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\SharpDX\Bin\Standard-net20\SharpDX.DXGI.dll</HintPath> <HintPath>..\..\packages\SharpDX.Direct3D11.Effects.2.4.2\lib\net40\SharpDX.Direct3D11.Effects.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DXGI, Version=2.4.2.0, Culture=neutral, PublicKeyToken=627a3d6d1956f55a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\SharpDX.DXGI.2.4.2\lib\net40\SharpDX.DXGI.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BlendState_DX11.cs" /> <Compile Include="BlendState_DX11.cs" />
@ -96,6 +98,13 @@
<Compile Include="DxTexture2D.cs" /> <Compile Include="DxTexture2D.cs" />
<Compile Include="DxVertexBuffer.cs" /> <Compile Include="DxVertexBuffer.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="sharpdx_direct3d11_effects_x64.dll" />
<Content Include="sharpdx_direct3d11_effects_x86.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -226,7 +226,7 @@ namespace ANX.RenderSystem.Windows.DX11
protected override Dx11.BlendState CreateNativeState(GraphicsDevice graphics) protected override Dx11.BlendState CreateNativeState(GraphicsDevice graphics)
{ {
Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice; Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice;
return new Dx11.BlendState(context.Device, ref blendStateDescription); return new Dx11.BlendState(context.Device, blendStateDescription);
} }
protected override void ApplyNativeState(GraphicsDevice graphics) protected override void ApplyNativeState(GraphicsDevice graphics)

View File

@ -173,7 +173,7 @@ namespace ANX.RenderSystem.Windows.DX11
protected override Dx11.DepthStencilState CreateNativeState(GraphicsDevice graphics) protected override Dx11.DepthStencilState CreateNativeState(GraphicsDevice graphics)
{ {
Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice; Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice;
return new Dx11.DepthStencilState(context.Device, ref description); return new Dx11.DepthStencilState(context.Device, description);
} }
protected override void ApplyNativeState(GraphicsDevice graphics) protected override void ApplyNativeState(GraphicsDevice graphics)

View File

@ -72,7 +72,7 @@ namespace ANX.RenderSystem.Windows.DX11
{ {
NativeEffect = new Dx11.Effect(device, GetByteCode(effectStream)); NativeEffect = new Dx11.Effect(device, GetByteCode(effectStream));
} }
catch (SharpDX.SharpDXException ex) catch (SharpDX.SharpDXException)
{ {
System.Diagnostics.Debugger.Break(); System.Diagnostics.Debugger.Break();
} }

View File

@ -435,10 +435,10 @@ namespace ANX.RenderSystem.Windows.DX11
#region SetViewport #region SetViewport
protected void SetViewport(int x, int y, int width, int height, float minDepth, float maxDepth) protected void SetViewport(int x, int y, int width, int height, float minDepth, float maxDepth)
{ {
nativeDevice.Rasterizer.SetViewports(new Dx11.Viewport(x, y, width, height, minDepth, maxDepth)); nativeDevice.Rasterizer.SetViewports(new SharpDX.Viewport(x, y, width, height, minDepth, maxDepth));
} }
protected void SetViewport(params Dx11.Viewport[] viewports) protected void SetViewport(params SharpDX.ViewportF[] viewports)
{ {
nativeDevice.Rasterizer.SetViewports(viewports); nativeDevice.Rasterizer.SetViewports(viewports);
} }
@ -509,7 +509,7 @@ namespace ANX.RenderSystem.Windows.DX11
// reset the RenderTarget to backbuffer // reset the RenderTarget to backbuffer
CreateDepthStencilBuffer(this.depthStencilBuffer.Description.Format, this.backBuffer.Description.Width, this.backBuffer.Description.Height, false); CreateDepthStencilBuffer(this.depthStencilBuffer.Description.Format, this.backBuffer.Description.Width, this.backBuffer.Description.Height, false);
nativeDevice.OutputMerger.SetTargets(this.depthStencilView, this.renderView); nativeDevice.OutputMerger.SetTargets(this.depthStencilView, this.renderView);
nativeDevice.Rasterizer.SetViewports(new Dx11.Viewport(0, 0, this.backBuffer.Description.Width, this.backBuffer.Description.Height)); nativeDevice.Rasterizer.SetViewports(new SharpDX.Viewport(0, 0, this.backBuffer.Description.Width, this.backBuffer.Description.Height));
// dispose the old views // dispose the old views
for (int i = 0; i < renderTargetView.Length; i++) for (int i = 0; i < renderTargetView.Length; i++)
@ -526,7 +526,7 @@ namespace ANX.RenderSystem.Windows.DX11
int renderTargetCount = renderTargets.Length; int renderTargetCount = renderTargets.Length;
RenderTargetView[] renderTargetsToDelete = new RenderTargetView[renderTargetView.Length]; RenderTargetView[] renderTargetsToDelete = new RenderTargetView[renderTargetView.Length];
Array.Copy(renderTargetView, renderTargetsToDelete, renderTargetView.Length); Array.Copy(renderTargetView, renderTargetsToDelete, renderTargetView.Length);
Dx11.Viewport[] rtViewports = new Dx11.Viewport[renderTargetCount]; SharpDX.ViewportF[] rtViewports = new SharpDX.ViewportF[renderTargetCount];
if (this.renderTargetView.Length != renderTargetCount) if (this.renderTargetView.Length != renderTargetCount)
{ {
@ -554,7 +554,7 @@ namespace ANX.RenderSystem.Windows.DX11
} }
renderTargetView[i] = new RenderTargetView(nativeDevice.Device, ((DxTexture2D)nativeRenderTarget).NativeShaderResourceView.Resource); renderTargetView[i] = new RenderTargetView(nativeDevice.Device, ((DxTexture2D)nativeRenderTarget).NativeShaderResourceView.Resource);
rtViewports[i] = new Dx11.Viewport(0, 0, width, height); rtViewports[i] = new SharpDX.Viewport(0, 0, width, height);
} }
} }

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("ANX.Framework Team")] [assembly: AssemblyCompany("ANX.Framework Team")]
[assembly: AssemblyProduct("ANX.RenderSystem.Windows.DX11")] [assembly: AssemblyProduct("ANX.RenderSystem.Windows.DX11")]
[assembly: AssemblyCopyright("Copyright (c) ANX.Framework Team 2011-2012")] [assembly: AssemblyCopyright("Copyright (c) ANX.Framework Team 2011-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Buildnummer // Buildnummer
// Revision // Revision
// //
[assembly: AssemblyVersion("0.7.18.*")] [assembly: AssemblyVersion("0.7.19.*")]
[assembly: AssemblyFileVersion("0.7.18.0")] [assembly: AssemblyFileVersion("0.7.19.0")]

View File

@ -89,7 +89,7 @@ namespace ANX.RenderSystem.Windows.DX11
protected override Dx11.RasterizerState CreateNativeState(GraphicsDevice graphics) protected override Dx11.RasterizerState CreateNativeState(GraphicsDevice graphics)
{ {
Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice; Dx11.DeviceContext context = (graphics.NativeDevice as GraphicsDeviceDX).NativeDevice;
return new Dx11.RasterizerState(context.Device, ref description); return new Dx11.RasterizerState(context.Device, description);
} }
protected override void ApplyNativeState(GraphicsDevice graphics) protected override void ApplyNativeState(GraphicsDevice graphics)

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpDX" version="2.4.2" targetFramework="net40-Client" />
<package id="SharpDX.D3DCompiler" version="2.4.2" targetFramework="net40-Client" />
<package id="SharpDX.Direct3D11" version="2.4.2" targetFramework="net40-Client" />
<package id="SharpDX.Direct3D11.Effects" version="2.4.2" targetFramework="net40-Client" />
<package id="SharpDX.DXGI" version="2.4.2" targetFramework="net40-Client" />
</packages>