diff --git a/SharpDX b/SharpDX new file mode 160000 index 000000000..250ec83b8 --- /dev/null +++ b/SharpDX @@ -0,0 +1 @@ +Subproject commit 250ec83b85876528d0456832be70cd99e2334962 diff --git a/SharpDX.sln b/SharpDX.sln index 48242c86f..1483e1447 100644 --- a/SharpDX.sln +++ b/SharpDX.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{CC8DB471-0644-430D-9D4B-808A2475BEC0}" ProjectSection(SolutionItems) = preProject @@ -27,8 +27,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.DXGI", "Source\Shar EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.XAudio2", "Source\SharpDX.XAudio2\SharpDX.XAudio2.csproj", "{4995127E-0B8E-45B8-80C4-6BAC1BBE3783}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.Direct3D9", "Source\SharpDX.Direct3D9\SharpDX.Direct3D9.csproj", "{B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.DirectInput", "Source\SharpDX.DirectInput\SharpDX.DirectInput.csproj", "{112F146B-7C01-490B-B943-EA9341ACCAF2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpPak", "Source\Tools\SharpPak\SharpPak.csproj", "{5E597A82-9DE9-4BA5-AD76-51202190E951}" @@ -44,8 +42,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentat EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{1B526C0E-EE4A-4E8F-BF8F-8C7397FB4918}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.RawInput", "Source\SharpDX.RawInput\SharpDX.RawInput.csproj", "{05D17A7B-F200-48C0-B8F9-B7211665A17F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.XInput", "Source\SharpDX.XInput\SharpDX.XInput.csproj", "{764D7CE5-F78B-432E-A849-E40BA44522D6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDX.Tests", "Source\Tests\SharpDX.Tests\SharpDX.Tests.csproj", "{931FA266-E756-41CA-9736-8B29235DC999}" @@ -66,8 +62,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.Mathematics", "Sour EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.Direct3D12", "Source\SharpDX.Direct3D12\SharpDX.Direct3D12.csproj", "{E5BB5D1C-6C07-495B-923B-FB80B79C535E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.Desktop", "Source\SharpDX.Desktop\SharpDX.Desktop.csproj", "{5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpDX.Direct3D10", "Source\SharpDX.Direct3D10\SharpDX.Direct3D10.csproj", "{618AFA87-81A8-4B1C-8876-5457D49F2DEF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{3EF31A42-4EEF-44AC-8D18-D036D080A955}" @@ -110,10 +104,6 @@ Global {4995127E-0B8E-45B8-80C4-6BAC1BBE3783}.Debug|Any CPU.Build.0 = Debug|Any CPU {4995127E-0B8E-45B8-80C4-6BAC1BBE3783}.Release|Any CPU.ActiveCfg = Release|Any CPU {4995127E-0B8E-45B8-80C4-6BAC1BBE3783}.Release|Any CPU.Build.0 = Release|Any CPU - {B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9}.Release|Any CPU.Build.0 = Release|Any CPU {112F146B-7C01-490B-B943-EA9341ACCAF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {112F146B-7C01-490B-B943-EA9341ACCAF2}.Debug|Any CPU.Build.0 = Debug|Any CPU {112F146B-7C01-490B-B943-EA9341ACCAF2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -126,10 +116,6 @@ Global {9AA405CA-B7FD-44D0-9EBC-21F5D0F44DEB}.Debug|Any CPU.Build.0 = Debug|Any CPU {9AA405CA-B7FD-44D0-9EBC-21F5D0F44DEB}.Release|Any CPU.ActiveCfg = Release|Any CPU {9AA405CA-B7FD-44D0-9EBC-21F5D0F44DEB}.Release|Any CPU.Build.0 = Release|Any CPU - {05D17A7B-F200-48C0-B8F9-B7211665A17F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05D17A7B-F200-48C0-B8F9-B7211665A17F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05D17A7B-F200-48C0-B8F9-B7211665A17F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05D17A7B-F200-48C0-B8F9-B7211665A17F}.Release|Any CPU.Build.0 = Release|Any CPU {764D7CE5-F78B-432E-A849-E40BA44522D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {764D7CE5-F78B-432E-A849-E40BA44522D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {764D7CE5-F78B-432E-A849-E40BA44522D6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -169,10 +155,6 @@ Global {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5BB5D1C-6C07-495B-923B-FB80B79C535E}.Release|Any CPU.Build.0 = Release|Any CPU - {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B}.Release|Any CPU.Build.0 = Release|Any CPU {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU {618AFA87-81A8-4B1C-8876-5457D49F2DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -189,11 +171,9 @@ Global {E927F2D5-8E27-462A-8687-CB207EE01164} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {3FC6DE77-B412-4101-9E64-6B9AA831179B} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {4995127E-0B8E-45B8-80C4-6BAC1BBE3783} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} - {B4D984DF-85B8-4BBF-8C3B-5CEF905F40D9} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {112F146B-7C01-490B-B943-EA9341ACCAF2} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {5E597A82-9DE9-4BA5-AD76-51202190E951} = {F1AF9A3B-7856-46C9-992A-391E5455BF1F} {9AA405CA-B7FD-44D0-9EBC-21F5D0F44DEB} = {57C5C966-ADB2-43F2-BB54-99BCB56C9F10} - {05D17A7B-F200-48C0-B8F9-B7211665A17F} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {764D7CE5-F78B-432E-A849-E40BA44522D6} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {931FA266-E756-41CA-9736-8B29235DC999} = {1B526C0E-EE4A-4E8F-BF8F-8C7397FB4918} {874DEC63-9AB9-4A09-B1EA-E8FB1F1B68A1} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} @@ -204,7 +184,6 @@ Global {F826CCCE-4B72-47F4-9493-DFCB51C106B7} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {49E4485F-3A2A-4C35-A159-12ECCFC00396} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {E5BB5D1C-6C07-495B-923B-FB80B79C535E} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} - {5F8DB9E8-FFAE-475F-AC2E-FE2DC5B15A1B} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} {618AFA87-81A8-4B1C-8876-5457D49F2DEF} = {CC8DB471-0644-430D-9D4B-808A2475BEC0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/Source/Directory.build.props b/Source/Directory.build.props index 97c8d8050..bb1048220 100644 --- a/Source/Directory.build.props +++ b/Source/Directory.build.props @@ -16,8 +16,8 @@ en-US $(MSBuildThisFileDirectory)/../bin DESKTOP_APP + REFERENCE REFERENCE - STORE_APP $(SharpGenMacros);$(AppType);DIRECTX11_1 $(DefineConstants);$(AppType) $(DefineConstants);BEFORE_NET45 @@ -47,10 +47,10 @@ - - + + - + diff --git a/Source/SharpDX.Animation/SharpDX.Animation.csproj b/Source/SharpDX.Animation/SharpDX.Animation.csproj index e3300de66..dda48d0d1 100644 --- a/Source/SharpDX.Animation/SharpDX.Animation.csproj +++ b/Source/SharpDX.Animation/SharpDX.Animation.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1 + net45;netstandard1.1 SharpDX.Animation SharpDX.Animation bin\$(Configuration)\$(TargetFramework)\SharpDX.Animation.xml @@ -19,6 +19,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj b/Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj index 94e2b556a..c7f3942d6 100644 --- a/Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj +++ b/Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.D3DCompiler SharpDX.D3DCompiler bin\$(Configuration)\$(TargetFramework)\SharpDX.D3DCompiler.xml @@ -19,4 +19,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.DXGI/SharpDX.DXGI.csproj b/Source/SharpDX.DXGI/SharpDX.DXGI.csproj index 7d5ee5084..4583e5ae2 100644 --- a/Source/SharpDX.DXGI/SharpDX.DXGI.csproj +++ b/Source/SharpDX.DXGI/SharpDX.DXGI.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.DXGI SharpDX.DXGI bin\$(Configuration)\$(TargetFramework)\SharpDX.DXGI.xml @@ -20,4 +20,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Desktop/SharpDX.Desktop.csproj b/Source/SharpDX.Desktop/SharpDX.Desktop.csproj index b7c741452..467938fda 100644 --- a/Source/SharpDX.Desktop/SharpDX.Desktop.csproj +++ b/Source/SharpDX.Desktop/SharpDX.Desktop.csproj @@ -1,7 +1,7 @@ - + - net40;net45 + net45 SharpDX.Desktop SharpDX.Desktop bin\$(Configuration)\$(TargetFramework)\SharpDX.Desktop.xml @@ -29,6 +29,9 @@ Form + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj b/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj index 7682034d1..5092b49aa 100644 --- a/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj +++ b/Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Direct2D1 SharpDX.Direct2D1 bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct2D1.xml @@ -21,4 +21,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj index 45a3f57b7..bc5715842 100644 --- a/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj +++ b/Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Direct3D10 SharpDX.Direct3D10 bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct3D10.xml @@ -23,4 +23,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D11.Effects/SharpDX.Direct3D11.Effects.csproj b/Source/SharpDX.Direct3D11.Effects/SharpDX.Direct3D11.Effects.csproj index f5c61e54b..61b72ee6d 100644 --- a/Source/SharpDX.Direct3D11.Effects/SharpDX.Direct3D11.Effects.csproj +++ b/Source/SharpDX.Direct3D11.Effects/SharpDX.Direct3D11.Effects.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Direct3D11.Effects SharpDX.Direct3D11.Effects bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct3D11.Effects.xml @@ -44,4 +44,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D11/DeviceContext.ComputeShaderStage.cs b/Source/SharpDX.Direct3D11/DeviceContext.ComputeShaderStage.cs index 660c6d955..c29cf363e 100644 --- a/Source/SharpDX.Direct3D11/DeviceContext.ComputeShaderStage.cs +++ b/Source/SharpDX.Direct3D11/DeviceContext.ComputeShaderStage.cs @@ -105,5 +105,16 @@ public unsafe void SetUnorderedAccessViews(int startSlot, SharpDX.Direct3D11.Uno fixed (void* puav = uavInitialCounts) SetUnorderedAccessViews(startSlot, unorderedAccessViews != null ? unorderedAccessViews.Length : 0, (IntPtr)unorderedAccessViewsOut_, (IntPtr)puav); } + + /// + /// Sets an array of views for an unordered resource. + /// + /// Index of the first element in the zero-based array to begin setting. + /// A reference to an array of references to be set by the method. + public unsafe void SetUnorderedAccessViews(int startSlot, ComArray unorderedAccessViews, int[] uavInitialCounts) + { + fixed (void* puav = uavInitialCounts) + SetUnorderedAccessViews(startSlot, unorderedAccessViews == null ? 0 : unorderedAccessViews.Length, unorderedAccessViews.NativePointer, (IntPtr)puav); + } } } \ No newline at end of file diff --git a/Source/SharpDX.Direct3D11/DeviceContext.OutputMergerStage.cs b/Source/SharpDX.Direct3D11/DeviceContext.OutputMergerStage.cs index 847b53c55..15691199e 100644 --- a/Source/SharpDX.Direct3D11/DeviceContext.OutputMergerStage.cs +++ b/Source/SharpDX.Direct3D11/DeviceContext.OutputMergerStage.cs @@ -122,7 +122,8 @@ public UnorderedAccessView[] GetUnorderedAccessViews(int startSlot, int count) var temp = new UnorderedAccessView[count]; DepthStencilView depthStencilView; GetRenderTargetsAndUnorderedAccessViews(0, new RenderTargetView[0], out depthStencilView, startSlot, count, temp); - depthStencilView.Dispose(); + if (depthStencilView != null) + depthStencilView.Dispose(); return temp; } diff --git a/Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj b/Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj index b96e73ed1..73fecdbed 100644 --- a/Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj +++ b/Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Direct3D11 SharpDX.Direct3D11 bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct3D11.xml @@ -21,4 +21,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D12/Mapping.xml b/Source/SharpDX.Direct3D12/Mapping.xml index eeb081e51..240cdcd33 100644 --- a/Source/SharpDX.Direct3D12/Mapping.xml +++ b/Source/SharpDX.Direct3D12/Mapping.xml @@ -239,7 +239,7 @@ - + diff --git a/Source/SharpDX.Direct3D12/SharpDX.Direct3D12.csproj b/Source/SharpDX.Direct3D12/SharpDX.Direct3D12.csproj index 53ef8fae1..9b2466df3 100644 --- a/Source/SharpDX.Direct3D12/SharpDX.Direct3D12.csproj +++ b/Source/SharpDX.Direct3D12/SharpDX.Direct3D12.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Direct3D12 SharpDX.Direct3D12 bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct3D12.xml @@ -21,4 +21,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Direct3D9/SharpDX.Direct3D9.csproj b/Source/SharpDX.Direct3D9/SharpDX.Direct3D9.csproj index f9b70b6b6..8b2e7fc84 100644 --- a/Source/SharpDX.Direct3D9/SharpDX.Direct3D9.csproj +++ b/Source/SharpDX.Direct3D9/SharpDX.Direct3D9.csproj @@ -1,7 +1,7 @@ - + - net40;net45;netstandard1.3 + net45;netstandard1.3 SharpDX.Direct3D9 SharpDX.Direct3D9 bin\$(Configuration)\$(TargetFramework)\SharpDX.Direct3D9.xml @@ -24,6 +24,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.DirectComposition/SharpDX.DirectComposition.csproj b/Source/SharpDX.DirectComposition/SharpDX.DirectComposition.csproj index e581da1bf..b17918242 100644 --- a/Source/SharpDX.DirectComposition/SharpDX.DirectComposition.csproj +++ b/Source/SharpDX.DirectComposition/SharpDX.DirectComposition.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.3 + net45;netstandard1.3 SharpDX.DirectComposition SharpDX.DirectComposition bin\$(Configuration)\$(TargetFramework)\SharpDX.DirectComposition.xml @@ -22,6 +22,9 @@ + + + diff --git a/Source/SharpDX.DirectInput/RawJoystickState.cs b/Source/SharpDX.DirectInput/RawJoystickState.cs index 7fb7114da..e0d995a66 100644 --- a/Source/SharpDX.DirectInput/RawJoystickState.cs +++ b/Source/SharpDX.DirectInput/RawJoystickState.cs @@ -271,27 +271,27 @@ DataObjectFormat[] IDataFormatProvider.ObjectsFormat new DataObjectFormat(ObjectGuid.RxAxis, 188, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), new DataObjectFormat(ObjectGuid.RyAxis, 192, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), new DataObjectFormat(ObjectGuid.RzAxis, 196, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), - new DataObjectFormat(ObjectGuid.Slider, 24, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), - new DataObjectFormat(ObjectGuid.Slider, 28, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), + new DataObjectFormat(ObjectGuid.Slider, 200, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), + new DataObjectFormat(ObjectGuid.Slider, 204, TypeRelativeAxisOpt, ObjectDataFormatFlags.Velocity), new DataObjectFormat(ObjectGuid.XAxis, 208, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.YAxis, 212, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.ZAxis, 216, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.RxAxis, 220, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.RyAxis, 224, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.RzAxis, 228, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), - new DataObjectFormat(ObjectGuid.Slider, 24, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), - new DataObjectFormat(ObjectGuid.Slider, 28, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), + new DataObjectFormat(ObjectGuid.Slider, 232, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), + new DataObjectFormat(ObjectGuid.Slider, 236, TypeRelativeAxisOpt, ObjectDataFormatFlags.Acceleration), new DataObjectFormat(ObjectGuid.XAxis, 240, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), new DataObjectFormat(ObjectGuid.YAxis, 244, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), new DataObjectFormat(ObjectGuid.ZAxis, 248, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), new DataObjectFormat(ObjectGuid.RxAxis, 252, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), new DataObjectFormat(ObjectGuid.RyAxis, 256, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), new DataObjectFormat(ObjectGuid.RzAxis, 260, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), - new DataObjectFormat(ObjectGuid.Slider, 24, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), - new DataObjectFormat(ObjectGuid.Slider, 28, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), + new DataObjectFormat(ObjectGuid.Slider, 264, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), + new DataObjectFormat(ObjectGuid.Slider, 268, TypeRelativeAxisOpt, ObjectDataFormatFlags.Force), }; */ } -} \ No newline at end of file +} diff --git a/Source/SharpDX.DirectInput/SharpDX.DirectInput.csproj b/Source/SharpDX.DirectInput/SharpDX.DirectInput.csproj index c91a22a56..5b60cf025 100644 --- a/Source/SharpDX.DirectInput/SharpDX.DirectInput.csproj +++ b/Source/SharpDX.DirectInput/SharpDX.DirectInput.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.3 + net45;netstandard1.3 SharpDX.DirectInput SharpDX.DirectInput bin\$(Configuration)\$(TargetFramework)\SharpDX.DirectInput.xml @@ -24,6 +24,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.DirectManipulation/SharpDX.DirectManipulation.csproj b/Source/SharpDX.DirectManipulation/SharpDX.DirectManipulation.csproj index e782f40d8..d920c5a48 100644 --- a/Source/SharpDX.DirectManipulation/SharpDX.DirectManipulation.csproj +++ b/Source/SharpDX.DirectManipulation/SharpDX.DirectManipulation.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1 + net45;netstandard1.1 SharpDX.DirectManipulation SharpDX.DirectManipulation bin\$(Configuration)\$(TargetFramework)\SharpDX.DirectManipulation.xml @@ -20,6 +20,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.DirectSound/SharpDX.DirectSound.csproj b/Source/SharpDX.DirectSound/SharpDX.DirectSound.csproj index c5eb4f442..f0f4eaef8 100644 --- a/Source/SharpDX.DirectSound/SharpDX.DirectSound.csproj +++ b/Source/SharpDX.DirectSound/SharpDX.DirectSound.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.3 + net45;netstandard1.3 SharpDX.DirectSound SharpDX.DirectSound bin\$(Configuration)\$(TargetFramework)\SharpDX.DirectSound.xml @@ -29,6 +29,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.Mathematics/Collision.cs b/Source/SharpDX.Mathematics/Collision.cs index 8f7d552b9..81b4f11c3 100644 --- a/Source/SharpDX.Mathematics/Collision.cs +++ b/Source/SharpDX.Mathematics/Collision.cs @@ -439,14 +439,18 @@ public static bool RayIntersectsRay(ref Ray ray1, ref Ray ray2, out Vector3 poin //Lines are parallel. if (MathUtil.IsZero(denominator)) { + point = Vector3.Zero; //Lines are parallel and on top of each other. if (MathUtil.NearEqual(ray2.Position.X, ray1.Position.X) && MathUtil.NearEqual(ray2.Position.Y, ray1.Position.Y) && MathUtil.NearEqual(ray2.Position.Z, ray1.Position.Z)) { - point = Vector3.Zero; return true; } + else + { + return false; + } } denominator = denominator * denominator; @@ -489,6 +493,12 @@ public static bool RayIntersectsRay(ref Ray ray1, ref Ray ray2, out Vector3 poin float s = dets / denominator; float t = dett / denominator; + if (s < 0 || t < 0) + { + point = Vector3.Zero; + return false; + } + //The points of intersection. Vector3 point1 = ray1.Position + (s * ray1.Direction); Vector3 point2 = ray2.Position + (t * ray2.Direction); diff --git a/Source/SharpDX.Mathematics/Ray.cs b/Source/SharpDX.Mathematics/Ray.cs index 5c2866f8e..1ca23cf51 100644 --- a/Source/SharpDX.Mathematics/Ray.cs +++ b/Source/SharpDX.Mathematics/Ray.cs @@ -284,7 +284,7 @@ public bool Intersects(ref BoundingSphere sphere, out Vector3 point) /// . /// Transformation . /// Resulting . - public static Ray GetPickRay(int x, int y, ViewportF viewport, Matrix worldViewProjection) + public static Ray GetPickRay(float x, float y, ViewportF viewport, Matrix worldViewProjection) { var nearPoint = new Vector3(x, y, 0); var farPoint = new Vector3(x, y, 1); @@ -300,6 +300,20 @@ public static Ray GetPickRay(int x, int y, ViewportF viewport, Matrix worldViewP return new Ray(nearPoint, direction); } + /// + /// Calculates a world space from 2d screen coordinates. + /// Integer version converts values to float + /// + /// X coordinate on 2d screen. + /// Y coordinate on 2d screen. + /// . + /// Transformation . + /// Resulting . + public static Ray GetPickRay(int x, int y, ViewportF viewport, Matrix worldViewProjection) + { + return GetPickRay((float)x, (float)y, viewport, worldViewProjection); + } + /// /// Tests for equality between two objects. /// diff --git a/Source/SharpDX.Mathematics/SharpDX.Mathematics.csproj b/Source/SharpDX.Mathematics/SharpDX.Mathematics.csproj index 8efc5759f..8350b41b2 100644 --- a/Source/SharpDX.Mathematics/SharpDX.Mathematics.csproj +++ b/Source/SharpDX.Mathematics/SharpDX.Mathematics.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.Mathematics SharpDX.Mathematics bin\$(Configuration)\$(TargetFramework)\SharpDX.Mathematics.xml @@ -18,4 +18,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.MediaFoundation/SharpDX.MediaFoundation.csproj b/Source/SharpDX.MediaFoundation/SharpDX.MediaFoundation.csproj index d700822d2..03d40013c 100644 --- a/Source/SharpDX.MediaFoundation/SharpDX.MediaFoundation.csproj +++ b/Source/SharpDX.MediaFoundation/SharpDX.MediaFoundation.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.MediaFoundation SharpDX.MediaFoundation bin\$(Configuration)\$(TargetFramework)\SharpDX.MediaFoundation.xml @@ -24,4 +24,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.RawInput/SharpDX.RawInput.csproj b/Source/SharpDX.RawInput/SharpDX.RawInput.csproj index 054a016f3..e1c326384 100644 --- a/Source/SharpDX.RawInput/SharpDX.RawInput.csproj +++ b/Source/SharpDX.RawInput/SharpDX.RawInput.csproj @@ -1,7 +1,7 @@ - + - net40;net45 + net45 SharpDX.RawInput SharpDX.RawInput bin\$(Configuration)\$(TargetFramework)\SharpDX.RawInput.xml @@ -29,6 +29,9 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX.XAudio2/SharpDX.XAudio2.csproj b/Source/SharpDX.XAudio2/SharpDX.XAudio2.csproj index 326b6f19c..e2610f419 100644 --- a/Source/SharpDX.XAudio2/SharpDX.XAudio2.csproj +++ b/Source/SharpDX.XAudio2/SharpDX.XAudio2.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.XAudio2 SharpDX.XAudio2 bin\$(Configuration)\$(TargetFramework)\SharpDX.XAudio2.xml @@ -26,5 +26,8 @@ + + + diff --git a/Source/SharpDX.XAudio2/VoiceShadow.cs b/Source/SharpDX.XAudio2/VoiceShadow.cs index 85a8e8184..f925ce7e5 100644 --- a/Source/SharpDX.XAudio2/VoiceShadow.cs +++ b/Source/SharpDX.XAudio2/VoiceShadow.cs @@ -64,35 +64,57 @@ public VoiceVtbl() static private void OnVoiceProcessingPassStartImpl(IntPtr thisObject, int bytes) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnVoiceProcessingPassStart(bytes); + } static private void OnVoiceProcessingPassEndImpl(IntPtr thisObject) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnVoiceProcessingPassEnd(); + } static private void OnStreamEndImpl(IntPtr thisObject) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnStreamEnd(); } static private void OnBufferStartImpl(IntPtr thisObject, IntPtr address) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnBufferStart(address); } static private void OnBufferEndImpl(IntPtr thisObject, IntPtr address) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnBufferEnd(address); } @@ -100,14 +122,22 @@ static private void OnBufferEndImpl(IntPtr thisObject, IntPtr address) static private void OnLoopEndImpl(IntPtr thisObject, IntPtr address) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnLoopEnd(address); } static private void OnVoiceErrorImpl(IntPtr thisObject, IntPtr bufferContextRef, int error) { var shadow = ToShadow(thisObject); + if (shadow == null) + return; var callback = (VoiceCallback)shadow.Callback; + if (callback == null) + return; callback.OnVoiceError(bufferContextRef, new Result(error)); } } @@ -117,4 +147,4 @@ protected override CppObjectVtbl GetVtbl get { return Vtbl; } } } -} \ No newline at end of file +} diff --git a/Source/SharpDX.XInput/SharpDX.XInput.csproj b/Source/SharpDX.XInput/SharpDX.XInput.csproj index bce5f863d..81a52417d 100644 --- a/Source/SharpDX.XInput/SharpDX.XInput.csproj +++ b/Source/SharpDX.XInput/SharpDX.XInput.csproj @@ -1,7 +1,7 @@  - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX.XInput SharpDX.XInput bin\$(Configuration)\$(TargetFramework)\SharpDX.XInput.xml @@ -20,4 +20,7 @@ + + + \ No newline at end of file diff --git a/Source/SharpDX/CallbackBase.cs b/Source/SharpDX/CallbackBase.cs index af4eaf470..bbfaf9a7f 100644 --- a/Source/SharpDX/CallbackBase.cs +++ b/Source/SharpDX/CallbackBase.cs @@ -40,7 +40,10 @@ protected override void Dispose(bool disposing) Release(); } } - + + /// + /// TBC + /// public int AddReference() { var old = refCount; @@ -59,6 +62,9 @@ public int AddReference() } } + /// + /// TBC + /// public int Release() { var old = refCount; @@ -72,8 +78,12 @@ public int Release() { // Dispose native resources var callback = ((ICallbackable)this); - callback.Shadow.Dispose(); - callback.Shadow = null; + + if (callback != null) + { + callback.Shadow?.Dispose(); + callback.Shadow = null; + } } return old - 1; } @@ -81,6 +91,9 @@ public int Release() } } + /// + /// TBC + /// public Result QueryInterface(ref Guid guid, out IntPtr comObject) { var container = (ShadowContainer)((ICallbackable)this).Shadow; diff --git a/Source/SharpDX/ComArray.cs b/Source/SharpDX/ComArray.cs index 07a43cd85..e35b7b4c9 100644 --- a/Source/SharpDX/ComArray.cs +++ b/Source/SharpDX/ComArray.cs @@ -29,7 +29,13 @@ namespace SharpDX /// public class ComArray : DisposeBase, IEnumerable { + /// + /// TBC + /// protected ComObject[] values; + /// + /// TBC + /// private IntPtr nativeBuffer; /// @@ -169,6 +175,9 @@ public T this[int i] } } + /// + /// Gets Enumarator Interface for . + /// public new IEnumerator GetEnumerator() { return new ArrayEnumerator(values.GetEnumerator()); diff --git a/Source/SharpDX/SharpDX.csproj b/Source/SharpDX/SharpDX.csproj index b9efcf329..f6ddb74d3 100644 --- a/Source/SharpDX/SharpDX.csproj +++ b/Source/SharpDX/SharpDX.csproj @@ -1,13 +1,14 @@  - - net40;net45;netstandard1.1;uap10.0 + net45;netstandard1.1 SharpDX SharpDX bin\$(Configuration)\$(TargetFramework)\SharpDX.xml SharpDX SharpDX Core assembly for all SharpDX assemblies. + false + false @@ -21,5 +22,9 @@ + + + + \ No newline at end of file diff --git a/Source/SharpDX/Text/ASCIIEncoding.cs b/Source/SharpDX/Text/ASCIIEncoding.cs index 730276745..64d882db5 100644 --- a/Source/SharpDX/Text/ASCIIEncoding.cs +++ b/Source/SharpDX/Text/ASCIIEncoding.cs @@ -19,9 +19,12 @@ // THE SOFTWARE. namespace SharpDX.Text { +#if NETSTANDARD1_1 /// /// Overrides in order to provide for Win8 Modern App. /// + /// +#endif public abstract class Encoding : System.Text.Encoding { #if NETSTANDARD1_1