Skip to content
Permalink
Browse files

[Build] Switch to netstandard2.0 wherever possible for the runtime

  • Loading branch information
xen2 committed Dec 18, 2018
1 parent 363f0aa commit 2213f133744fa821d710e343e59d82ba5622f7d7
Showing with 137 additions and 203 deletions.
  1. +1 −1 build/Xenko.build
  2. +1 −1 sources/core/Xenko.Core.IO/Xenko.Core.IO.csproj
  3. +3 −2 sources/core/Xenko.Core.Mathematics/Xenko.Core.Mathematics.csproj
  4. +3 −2 sources/core/Xenko.Core.MicroThreading/Xenko.Core.MicroThreading.csproj
  5. +4 −3 sources/core/Xenko.Core.Reflection/Xenko.Core.Reflection.csproj
  6. +3 −2 sources/core/Xenko.Core.Serialization/Xenko.Core.Serialization.csproj
  7. +1 −0 sources/core/Xenko.Core/Xenko.Core.csproj
  8. +1 −1 sources/engine/Xenko.Audio.Tests/Xenko.Audio.Tests.Windows.csproj
  9. +1 −1 sources/engine/Xenko.Engine.Tests/Xenko.Engine.Tests.Windows.csproj
  10. +2 −4 sources/engine/Xenko.Games/Xenko.Games.csproj
  11. +1 −1 sources/engine/Xenko.Graphics.Tests.10_0/Xenko.Graphics.Tests.10_0.Windows.csproj
  12. +1 −1 sources/engine/Xenko.Graphics.Tests.11_0/Xenko.Graphics.Tests.11_0.Windows.csproj
  13. +1 −1 sources/engine/Xenko.Graphics.Tests/Xenko.Graphics.Tests.Windows.csproj
  14. +4 −4 sources/engine/Xenko.Graphics/Xenko.Graphics.csproj
  15. +1 −1 sources/engine/Xenko.Input.Tests/Xenko.Input.Tests.Windows.csproj
  16. +4 −3 sources/engine/Xenko.Input/Xenko.Input.csproj
  17. +1 −1 sources/engine/Xenko.Navigation.Tests/Xenko.Navigation.Tests.Windows.csproj
  18. +1 −1 sources/engine/Xenko.Particles.Tests/Xenko.Particles.Tests.Windows.csproj
  19. +3 −2 sources/engine/Xenko.Particles/Xenko.Particles.csproj
  20. +1 −1 sources/engine/Xenko.Physics.Tests/Xenko.Physics.Tests.Windows.csproj
  21. +1 −1 sources/engine/Xenko.Shaders.Compiler/Xenko.Shaders.Compiler.csproj
  22. +3 −2 sources/engine/Xenko.Shaders.Parser/Xenko.Shaders.Parser.csproj
  23. +3 −2 sources/engine/Xenko.Shaders/Xenko.Shaders.csproj
  24. +3 −2 sources/engine/Xenko.SpriteStudio.Runtime/Xenko.SpriteStudio.Runtime.csproj
  25. +1 −1 sources/engine/Xenko.UI.Tests/Xenko.UI.Tests.Windows.csproj
  26. +4 −4 sources/engine/Xenko.Video/Xenko.Video.csproj
  27. +1 −1 sources/engine/Xenko/Graphics/DDSHelper.cs
  28. +1 −4 sources/engine/Xenko/Graphics/StandardImageHelper.Android.cs
  29. +3 −99 sources/engine/Xenko/Graphics/StandardImageHelper.Windows.cs
  30. +3 −10 sources/engine/Xenko/Xenko.csproj
  31. +5 −4 sources/shaders/Irony/Irony.csproj
  32. +0 −2 sources/shaders/Irony/Parsing/Diagnostics/ParseTreeExtensions.cs
  33. +3 −2 sources/shaders/Xenko.Core.Shaders/Xenko.Core.Shaders.csproj
  34. +2 −1 sources/shared/Xenko.NuGetResolver/RestoreHelper.cs
  35. +39 −17 sources/targets/Xenko.Core.PreSettings.targets
  36. +19 −9 sources/targets/Xenko.GlobalSettings.targets
  37. +3 −4 sources/tools/Xenko.Graphics.RenderDocPlugin/Xenko.Graphics.RenderDocPlugin.csproj
  38. +5 −5 sources/tools/Xenko.VisualStudio.Package/Xenko.VisualStudio.Package.csproj
@@ -144,7 +144,7 @@ Example of use:
</Target>

<Target Name="BuildWindows" DependsOnTargets="CopyXenkoKey">
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="XenkoPlatforms=$(XenkoPlatforms);XenkoSolution=$(XenkoSolution).Runtime;XenkoGraphicsApiDependentBuildAll=$(XenkoGraphicsApiDependentBuildAll)"/>
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="XenkoPlatforms=$(XenkoPlatforms);XenkoSolution=$(XenkoSolution);XenkoGraphicsApiDependentBuildAll=$(XenkoGraphicsApiDependentBuildAll)"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).sln" Properties="$(BuildProperties);XenkoSkipAutoPack=true;XenkoSkipUnitTests=true;XenkoGraphicsApiDependentBuildAll=$(XenkoGraphicsApiDependentBuildAll)"/>
</Target>

@@ -34,7 +34,7 @@
<ProjectReference Include="..\Xenko.Core\Xenko.Core.csproj">
<PrivateAssets>contentfiles;analyzers</PrivateAssets>
</ProjectReference>
<PackageReference Include="SharpDX" Version="4.0.1" Condition="$(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="SharpDX" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'UWP'" />
</ItemGroup>

<Import Project="$(XenkoPostSettingsTargets)" />
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.Core.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -28,5 +29,5 @@
<ProjectReference Include="..\Xenko.Core\Xenko.Core.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.Core.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -27,5 +28,5 @@
<ProjectReference Include="..\Xenko.Core\Xenko.Core.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -1,14 +1,15 @@
<Project>
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.Core.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<XenkoAssemblyProcessor>false</XenkoAssemblyProcessor>
<TargetFramework>$(XenkoRuntimeTargetFramework)</TargetFramework>
<!--
<XenkoPlatformDependent>true</XenkoPlatformDependent>
<XenkoAssemblyProcessorOptions>$(XenkoAssemblyProcessorDefaultOptions)</XenkoAssemblyProcessorOptions>
@@ -35,5 +36,5 @@
</When>
</Choose>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.Core.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -34,5 +35,5 @@
<Folder Include="Reflection\" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -50,6 +50,7 @@

<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.2" Condition="'$(XenkoPlatform)' == 'UWP'" />
</ItemGroup>

<ItemGroup>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Audio.Tests</RootNamespace>
<AssemblyName>Xenko.Audio.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Engine.Tests</RootNamespace>
<AssemblyName>Xenko.Engine.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -2,6 +2,7 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeWindowsDotNet>true</XenkoRuntimeWindowsDotNet>
<XenkoGraphicsApiDependent>true</XenkoGraphicsApiDependent>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
@@ -16,10 +17,6 @@
<XenkoBuildTags>*</XenkoBuildTags>
<XenkoCodeAnalysis>true</XenkoCodeAnalysis>
</PropertyGroup>
<Choose>
<When Condition=" '$(AutoIncludeSystemAssembly)' != 'true'">
</When>
</Choose>
<Import Condition="$(XenkoUI.Contains('SDL'))" Project="..\..\targets\SDL.targets" />
<Choose>
<When Condition="$(XenkoUI.Contains('WINFORMS')) OR $(XenkoUI.Contains('WPF'))">
@@ -32,6 +29,7 @@
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\Xenko.Graphics\OpenGL\OpenGLUtils.cs" Link="OpenGLUtils.cs" />
<Compile Update="Resources\GameResources.Designer.cs" Condition=" '$(XenkoPlatform)' == 'Windows'">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Graphics.Tests</RootNamespace>
<AssemblyName>Xenko.Graphics.Tests.10_0</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Graphics.Tests</RootNamespace>
<AssemblyName>Xenko.Graphics.Tests.11_0</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<AssemblyName>Xenko.Graphics.Tests</AssemblyName>
<RootNamespace>Xenko.Graphics.Tests</RootNamespace>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -192,10 +192,10 @@
<ProjectReference Include="..\Xenko.Shaders\Xenko.Shaders.csproj" />
<ProjectReference Include="..\Xenko\Xenko.csproj" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.1.1" />
<PackageReference Include="SharpDX.Direct3D11" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or $(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="SharpDX.Direct3D12" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or $(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="Xenko.OpenTK" Version="1.0.2" Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'xamarinios10' Or '$(TargetFramework)' == 'monoandroid50' Or '$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="SharpDX.Direct3D11" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'UWP'" />
<PackageReference Include="SharpDX.Direct3D12" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows'" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'UWP'" />
<PackageReference Include="Xenko.OpenTK" Version="1.0.2" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'Linux' Or '$(XenkoPlatform)' == 'iOS' Or '$(XenkoPlatform)' == 'Android'" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Input.Tests</RootNamespace>
<AssemblyName>Xenko.Input.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -2,6 +2,7 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeWindowsDotNet>true</XenkoRuntimeWindowsDotNet>
<XenkoGraphicsApiDependent>true</XenkoGraphicsApiDependent>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
@@ -32,9 +33,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xenko.Games\Xenko.Games.csproj" />
<PackageReference Include="SharpDX.RawInput" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.DirectInput" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.XInput" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.RawInput" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' And $(TargetFramework.StartsWith('net4'))" />
<PackageReference Include="SharpDX.DirectInput" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows'" />
<PackageReference Include="SharpDX.XInput" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows'" />
</ItemGroup>
<ItemGroup />
<Import Project="$(XenkoPostSettingsTargets)" />
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Navigation.Tests</RootNamespace>
<AssemblyName>Xenko.Navigation.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Particles.Tests</RootNamespace>
<AssemblyName>Xenko.Particles.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -1,9 +1,10 @@
<Project>
<PropertyGroup>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<XenkoAssemblyProcessor>true</XenkoAssemblyProcessor>
<XenkoPlatformDependent>true</XenkoPlatformDependent>
@@ -112,5 +113,5 @@
<None Include="Docs\VertexAttributes.txt" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.Physics.Tests</RootNamespace>
<AssemblyName>Xenko.Physics.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -22,7 +22,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xenko.Shaders.Parser\Xenko.Shaders.Parser.csproj" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or $(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'UWP'" />
</ItemGroup>
<ItemGroup Condition="'$(XenkoPlatform)' == 'Windows'">
<XenkoNativeLib Include="$(WindowsSdkDir_10)\Redist\D3D\**\d3dcompiler_47.dll">
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -31,5 +32,5 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -26,5 +27,5 @@
<ProjectReference Include="..\Xenko\Xenko.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -2,9 +2,10 @@
<PropertyGroup>
<XenkoAssemblySign>true</XenkoAssemblySign>
<XenkoRuntime>true</XenkoRuntime>
<XenkoRuntimeNetStandard>true</XenkoRuntimeNetStandard>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -24,5 +25,5 @@
<ProjectReference Include="..\Xenko.Engine\Xenko.Engine.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
@@ -5,7 +5,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Xenko.UI.Tests</RootNamespace>
<AssemblyName>Xenko.UI.Tests</AssemblyName>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<XenkoBuildTags>*</XenkoBuildTags>
@@ -33,9 +33,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xenko.Engine\Xenko.Engine.csproj" />
<PackageReference Include="SharpDX.MediaFoundation" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or $(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="SharpDX.Direct3D11" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or $(TargetFramework.StartsWith('uap10.0'))" />
<PackageReference Include="SharpDX.Direct3D12" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.MediaFoundation" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'UWP'" />
<PackageReference Include="SharpDX.Direct3D11" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows' Or '$(XenkoPlatform)' == 'UWP'" />
<PackageReference Include="SharpDX.Direct3D12" Version="4.0.1" Condition="'$(XenkoPlatform)' == 'Windows'" />
</ItemGroup>
<Choose>
<When Condition="$(DefineConstants.Contains(XENKO_VIDEO_FFMPEG))">
@@ -62,7 +62,7 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="FFmpeg.AutoGen" Version="3.4.0.2" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="FFmpeg.AutoGen" Version="3.4.0.2" Condition="'$(XenkoPlatform)' == 'Windows'" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
@@ -989,7 +989,7 @@ public static unsafe Image LoadFromDDSMemory(IntPtr pSource, int size, bool make
{
var flags = makeACopy ? DDSFlags.CopyMemory : DDSFlags.None;

#if XENKO_GRAPHICS_API_OPENGLES
#if XENKO_PLATFORM_ANDROID
// Directly load image as RGBA instead of BGRA, because OpenGL ES devices don't support it out of the box (extension).
flags |= DDSFlags.ForceRgb;
#endif
@@ -32,13 +32,10 @@ public static unsafe Image LoadFromMemory(IntPtr pSource, int size, bool makeACo
var bitmapData = bitmap.LockPixels();

var image = Image.New2D(bitmap.Width, bitmap.Height, 1, PixelFormat.B8G8R8A8_UNorm, 1, bitmap.RowBytes);
#if XENKO_GRAPHICS_API_OPENGLES
// Directly load image as RGBA instead of BGRA, because OpenGL ES devices don't support it out of the box (extension).
image.Description.Format = PixelFormat.R8G8B8A8_UNorm;
CopyMemoryBGRA(image.PixelBuffer[0].DataPointer, bitmapData, image.PixelBuffer[0].BufferStride);
#else
Utilities.CopyMemory(image.PixelBuffer[0].DataPointer, bitmapData, image.PixelBuffer[0].BufferStride);
#endif
//Utilities.CopyMemory(image.PixelBuffer[0].DataPointer, bitmapData, image.PixelBuffer[0].BufferStride);
bitmap.UnlockPixels();
bitmap.Dispose();

0 comments on commit 2213f13

Please sign in to comment.
You can’t perform that action at this time.