Merge pull request #858 from Sergio0694/dev/uwp-xaml-sample
Add UWP XAML sample app back
検索条件に一致するファイルはありません
@@ -193,6 +193,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.WinUI.Cod
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.Uwp.CodeFixers", "src\ComputeSharp.D2D1.Uwp.CodeFixers\ComputeSharp.D2D1.Uwp.CodeFixers.csproj", "{8BE73DB3-16E0-41F4-A87F-0C2AB43856A2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.SwapChain.Uwp", "samples\ComputeSharp.SwapChain.Uwp\ComputeSharp.SwapChain.Uwp.csproj", "{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.UI", "samples\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.shproj", "{6BC471C6-72F9-43CF-AE1E-F6D3E5ED3129}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@@ -557,6 +561,18 @@ Global
|
||||
{8BE73DB3-16E0-41F4-A87F-0C2AB43856A2}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{8BE73DB3-16E0-41F4-A87F-0C2AB43856A2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8BE73DB3-16E0-41F4-A87F-0C2AB43856A2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|x64.Build.0 = Debug|x64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|x64.ActiveCfg = Release|x64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|x64.Build.0 = Release|x64
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8}.Release|x64.Deploy.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -598,6 +614,8 @@ Global
|
||||
{551EF4FB-F34F-412A-B3E6-E345797560ED} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{9FBE070E-A210-4CEF-9F04-61C2B269C600} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{916331A5-1EA6-41D7-B199-2E50C513EFDE} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7}
|
||||
{6A861D53-2DBD-4B4F-8543-90DC8C0F2DC8} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{6BC471C6-72F9-43CF-AE1E-F6D3E5ED3129} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC}
|
||||
@@ -605,6 +623,7 @@ Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems*{0800bd51-499d-44c2-9417-fd1f7fdfe9c4}*SharedItemsImports = 13
|
||||
src\ComputeSharp.UI\ComputeSharp.UI.projitems*{1cd1d9c5-7e00-43fb-a8c3-cfe98a885d3b}*SharedItemsImports = 13
|
||||
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{209c95a3-fa53-431b-b688-3299ca6c29d2}*SharedItemsImports = 5
|
||||
@@ -617,6 +636,10 @@ Global
|
||||
src\ComputeSharp.CodeFixing\ComputeSharp.CodeFixing.projitems*{54654960-54b5-4e19-b3ed-993591ca39e5}*SharedItemsImports = 5
|
||||
src\ComputeSharp.D2D1.UI.SourceGenerators\ComputeSharp.D2D1.UI.SourceGenerators.projitems*{690c4014-a06b-44db-b717-aea4cafa9d68}*SharedItemsImports = 5
|
||||
src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{690c4014-a06b-44db-b717-aea4cafa9d68}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{6a861d53-2dbd-4b4f-8543-90dc8c0f2dc8}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems*{6a861d53-2dbd-4b4f-8543-90dc8c0f2dc8}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.projitems*{6a861d53-2dbd-4b4f-8543-90dc8c0f2dc8}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.projitems*{6bc471c6-72f9-43cf-ae1e-f6d3e5ed3129}*SharedItemsImports = 13
|
||||
src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{716df19e-69ba-4a9c-9ca4-bfd196152f46}*SharedItemsImports = 5
|
||||
samples\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems*{73c32d0f-64db-4674-84e9-8fcc41228474}*SharedItemsImports = 5
|
||||
src\ComputeSharp.D2D1.UI.CodeFixers\ComputeSharp.D2D1.UI.CodeFixers.projitems*{8be73db3-16e0-41f4-a87f-0c2ab43856a2}*SharedItemsImports = 5
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="toolkit-MainLatest" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -5,7 +5,7 @@
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion>
|
||||
<UseUwp>true</UseUwp>
|
||||
<Platforms>x64;arm64</Platforms>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
|
||||
|
変更前 幅: | 高さ: | サイズ: 3.6 KiB 変更後 幅: | 高さ: | サイズ: 3.6 KiB |
|
変更前 幅: | 高さ: | サイズ: 4.3 KiB 変更後 幅: | 高さ: | サイズ: 4.3 KiB |
|
変更前 幅: | 高さ: | サイズ: 4.9 KiB 変更後 幅: | 高さ: | サイズ: 4.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 6.7 KiB 変更後 幅: | 高さ: | サイズ: 6.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 15 KiB 変更後 幅: | 高さ: | サイズ: 15 KiB |
|
変更前 幅: | 高さ: | サイズ: 432 B 変更後 幅: | 高さ: | サイズ: 432 B |
|
変更前 幅: | 高さ: | サイズ: 208 KiB 変更後 幅: | 高さ: | サイズ: 208 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.8 KiB 変更後 幅: | 高さ: | サイズ: 1.8 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.8 KiB 変更後 幅: | 高さ: | サイズ: 1.8 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.0 KiB 変更後 幅: | 高さ: | サイズ: 2.0 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.3 KiB 変更後 幅: | 高さ: | サイズ: 2.3 KiB |
|
変更前 幅: | 高さ: | サイズ: 3.5 KiB 変更後 幅: | 高さ: | サイズ: 3.5 KiB |
|
変更前 幅: | 高さ: | サイズ: 4.2 KiB 変更後 幅: | 高さ: | サイズ: 4.2 KiB |
|
変更前 幅: | 高さ: | サイズ: 5.0 KiB 変更後 幅: | 高さ: | サイズ: 5.0 KiB |
|
変更前 幅: | 高さ: | サイズ: 5.8 KiB 変更後 幅: | 高さ: | サイズ: 5.8 KiB |
|
変更前 幅: | 高さ: | サイズ: 8.3 KiB 変更後 幅: | 高さ: | サイズ: 8.3 KiB |
|
変更前 幅: | 高さ: | サイズ: 20 KiB 変更後 幅: | 高さ: | サイズ: 20 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.3 KiB 変更後 幅: | 高さ: | サイズ: 2.3 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.7 KiB 変更後 幅: | 高さ: | サイズ: 2.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.9 KiB 変更後 幅: | 高さ: | サイズ: 2.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 3.7 KiB 変更後 幅: | 高さ: | サイズ: 3.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 6.6 KiB 変更後 幅: | 高さ: | サイズ: 6.6 KiB |
|
変更前 幅: | 高さ: | サイズ: 508 B 変更後 幅: | 高さ: | サイズ: 508 B |
|
変更前 幅: | 高さ: | サイズ: 796 B 変更後 幅: | 高さ: | サイズ: 796 B |
|
変更前 幅: | 高さ: | サイズ: 2.9 KiB 変更後 幅: | 高さ: | サイズ: 2.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 711 B 変更後 幅: | 高さ: | サイズ: 711 B |
|
変更前 幅: | 高さ: | サイズ: 826 B 変更後 幅: | 高さ: | サイズ: 826 B |
|
変更前 幅: | 高さ: | サイズ: 508 B 変更後 幅: | 高さ: | サイズ: 508 B |
|
変更前 幅: | 高さ: | サイズ: 2.9 KiB 変更後 幅: | 高さ: | サイズ: 2.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 711 B 変更後 幅: | 高さ: | サイズ: 711 B |
|
変更前 幅: | 高さ: | サイズ: 826 B 変更後 幅: | 高さ: | サイズ: 826 B |
|
変更前 幅: | 高さ: | サイズ: 1.4 KiB 変更後 幅: | 高さ: | サイズ: 1.4 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.6 KiB 変更後 幅: | 高さ: | サイズ: 1.6 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.5 KiB 変更後 幅: | 高さ: | サイズ: 1.5 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.7 KiB 変更後 幅: | 高さ: | サイズ: 1.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.9 KiB 変更後 幅: | 高さ: | サイズ: 1.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 508 B 変更後 幅: | 高さ: | サイズ: 508 B |
|
変更前 幅: | 高さ: | サイズ: 796 B 変更後 幅: | 高さ: | サイズ: 796 B |
|
変更前 幅: | 高さ: | サイズ: 796 B 変更後 幅: | 高さ: | サイズ: 796 B |
|
変更前 幅: | 高さ: | サイズ: 2.9 KiB 変更後 幅: | 高さ: | サイズ: 2.9 KiB |
|
変更前 幅: | 高さ: | サイズ: 711 B 変更後 幅: | 高さ: | サイズ: 711 B |
|
変更前 幅: | 高さ: | サイズ: 826 B 変更後 幅: | 高さ: | サイズ: 826 B |
|
変更前 幅: | 高さ: | サイズ: 456 B 変更後 幅: | 高さ: | サイズ: 456 B |
|
変更前 幅: | 高さ: | サイズ: 1.4 KiB 変更後 幅: | 高さ: | サイズ: 1.4 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.6 KiB 変更後 幅: | 高さ: | サイズ: 1.6 KiB |
|
変更前 幅: | 高さ: | サイズ: 1.7 KiB 変更後 幅: | 高さ: | サイズ: 1.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.0 KiB 変更後 幅: | 高さ: | サイズ: 2.0 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.7 KiB 変更後 幅: | 高さ: | サイズ: 2.7 KiB |
|
変更前 幅: | 高さ: | サイズ: 2.6 KiB 変更後 幅: | 高さ: | サイズ: 2.6 KiB |
|
変更前 幅: | 高さ: | サイズ: 3.0 KiB 変更後 幅: | 高さ: | サイズ: 3.0 KiB |
|
変更前 幅: | 高さ: | サイズ: 3.2 KiB 変更後 幅: | 高さ: | サイズ: 3.2 KiB |
|
変更前 幅: | 高さ: | サイズ: 4.2 KiB 変更後 幅: | 高さ: | サイズ: 4.2 KiB |
|
変更前 幅: | 高さ: | サイズ: 8.3 KiB 変更後 幅: | 高さ: | サイズ: 8.3 KiB |
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<HasSharedItems>true</HasSharedItems>
|
||||
<SharedGUID>6bc471c6-72f9-43cf-ae1e-f6d3e5ed3129</SharedGUID>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<Import_RootNamespace>ComputeSharp.SwapChain.UI</Import_RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Misc\noise_low.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\ComputeSharp.SwapChain\Textures\RustyMetal.png" Link="Assets\Textures\RustyMetal.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LargeTile.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LargeTile.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LargeTile.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LargeTile.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LargeTile.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SmallTile.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SmallTile.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SmallTile.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SmallTile.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SmallTile.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-lightunplated_targetsize-16.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-lightunplated_targetsize-24.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-lightunplated_targetsize-256.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-unplated_targetsize-16.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-unplated_targetsize-256.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-unplated_targetsize-32.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.altform-unplated_targetsize-48.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-16.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-24.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-256.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-32.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-48.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.backup.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.scale-400.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-100.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-125.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-150.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-400.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\D2D1AnimatedPixelShaderPanel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Converters\RenderingPauseConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Converters\ResolutionScaleConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Enums\RenderingMode.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Shaders\PixelShaderEffect.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Shaders\Runners\ContouredLayersRunner.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Shaders\Runners\D2D1ContouredLayersRunner.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModels\MainViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModels\ShaderRunnerViewModel.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>6bc471c6-72f9-43cf-ae1e-f6d3e5ed3129</ProjectGuid>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
||||
<PropertyGroup />
|
||||
<Import Project="ComputeSharp.SwapChain.UI.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,10 +1,19 @@
|
||||
using ComputeSharp.SwapChain.Core.Shaders;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.UI.Xaml;
|
||||
#if WINDOWS_UWP
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
#else
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
#endif
|
||||
|
||||
#if WINDOWS_UWP
|
||||
namespace ComputeSharp.SwapChain.Uwp.Views;
|
||||
#else
|
||||
namespace ComputeSharp.SwapChain.WinUI.Views;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// A custom <see cref="Control"/> that can be used to render animated backgrounds via Win2D.
|
||||
@@ -1,4 +1,8 @@
|
||||
#if WINDOWS_UWP
|
||||
using Windows.UI.Xaml.Controls;
|
||||
#else
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
#endif
|
||||
|
||||
namespace ComputeSharp.SwapChain.Core.Converters;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using ComputeSharp.D2D1;
|
||||
using ComputeSharp.D2D1.Descriptors;
|
||||
#if WINDOWS_UWP
|
||||
using ComputeSharp.D2D1.Uwp;
|
||||
#else
|
||||
using ComputeSharp.D2D1.WinUI;
|
||||
#endif
|
||||
|
||||
namespace ComputeSharp.SwapChain.Core.Shaders;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using ComputeSharp.SwapChain.Shaders;
|
||||
#if WINDOWS_UWP
|
||||
using ComputeSharp.Uwp;
|
||||
#else
|
||||
using ComputeSharp.WinUI;
|
||||
#endif
|
||||
using Windows.ApplicationModel;
|
||||
|
||||
namespace ComputeSharp.SwapChain.Core.Shaders.Runners;
|
||||
@@ -2,7 +2,11 @@ using System;
|
||||
using System.IO;
|
||||
using ComputeSharp.D2D1;
|
||||
using ComputeSharp.D2D1.Interop;
|
||||
#if WINDOWS_UWP
|
||||
using ComputeSharp.D2D1.Uwp;
|
||||
#else
|
||||
using ComputeSharp.D2D1.WinUI;
|
||||
#endif
|
||||
using ComputeSharp.SwapChain.Shaders.D2D1;
|
||||
using Windows.ApplicationModel;
|
||||
|
||||
@@ -5,7 +5,11 @@ using ComputeSharp.SwapChain.Core.Enums;
|
||||
using ComputeSharp.SwapChain.Core.Shaders;
|
||||
using ComputeSharp.SwapChain.Core.Shaders.Runners;
|
||||
using ComputeSharp.SwapChain.Shaders;
|
||||
#if WINDOWS_UWP
|
||||
using ComputeSharp.Uwp;
|
||||
#else
|
||||
using ComputeSharp.WinUI;
|
||||
#endif
|
||||
|
||||
#pragma warning disable IDE0300 // CsWinRT does not support marshalling collection expression (https://github.com/microsoft/CsWinRT/issues/1661)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using ComputeSharp.SwapChain.Core.Shaders;
|
||||
#if WINDOWS_UWP
|
||||
using ComputeSharp.Uwp;
|
||||
#else
|
||||
using ComputeSharp.WinUI;
|
||||
#endif
|
||||
|
||||
namespace ComputeSharp.SwapChain.Core.ViewModels;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<Application
|
||||
x:Class="ComputeSharp.SwapChain.Uwp.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
<ResourceDictionary Source="Controls/D2D1AnimatedPixelShaderPanel.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@@ -0,0 +1,72 @@
|
||||
using ComputeSharp.SwapChain.Uwp.Views;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.ApplicationModel.Core;
|
||||
using Windows.UI;
|
||||
using Windows.UI.ViewManagement;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace ComputeSharp.SwapChain.Uwp;
|
||||
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
sealed partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||
{
|
||||
if (Window.Current.Content is not MainView)
|
||||
{
|
||||
StyleTitleBar();
|
||||
ExpandViewIntoTitleBar();
|
||||
|
||||
Window.Current.Content = new MainView();
|
||||
}
|
||||
|
||||
if (!e.PrelaunchActivated)
|
||||
{
|
||||
Window.Current.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Styles the title bar buttons according to the theme in use
|
||||
/// </summary>
|
||||
private static void StyleTitleBar()
|
||||
{
|
||||
ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
||||
|
||||
// Transparent colors
|
||||
titleBar.ForegroundColor = Colors.Transparent;
|
||||
titleBar.BackgroundColor = Colors.Transparent;
|
||||
titleBar.ButtonBackgroundColor = Colors.Transparent;
|
||||
titleBar.InactiveBackgroundColor = Colors.Transparent;
|
||||
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
|
||||
|
||||
// Theme aware colors
|
||||
titleBar.ButtonForegroundColor = titleBar.ButtonHoverForegroundColor = titleBar.ButtonPressedForegroundColor = Colors.White;
|
||||
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(0x20, 0xFF, 0xFF, 0xFF);
|
||||
titleBar.ButtonPressedBackgroundColor = Color.FromArgb(0x40, 0xFF, 0xFF, 0xFF);
|
||||
titleBar.ButtonInactiveForegroundColor = Color.FromArgb(0xC0, 0xFF, 0xFF, 0xFF);
|
||||
titleBar.InactiveForegroundColor = Color.FromArgb(0xA0, 0xA0, 0xA0, 0xA0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets up the app UI to be expanded into the title bar
|
||||
/// </summary>
|
||||
private static void ExpandViewIntoTitleBar()
|
||||
{
|
||||
CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
|
||||
|
||||
coreTitleBar.ExtendViewIntoTitleBar = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<WindowsSdkPackageVersion>10.0.26100.57</WindowsSdkPackageVersion>
|
||||
<UseUwp>true</UseUwp>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<PublishAot>true</PublishAot>
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
|
||||
<!-- Disable 'INotifyPropertyChanging' support, same as in the WinUI 3 sample app -->
|
||||
<MvvmToolkitEnableINotifyPropertyChangingSupport>false</MvvmToolkitEnableINotifyPropertyChangingSupport>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Use the Windows SDK from the NuGet-only release, to access early builds with the .NET 9 changes.
|
||||
Can be removed when the new XAML compiler is ingested into Visual Studio and available in the CI.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.SDK.CPP" Version="10.0.26100.2161" IncludeAssets="build" PrivateAssets="all" IsImplicitlyDefined="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Same CsWinRT options as the WinUI 3 sample app -->
|
||||
<PropertyGroup>
|
||||
<CsWinRTGenerateProjection>false</CsWinRTGenerateProjection>
|
||||
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
|
||||
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- CsWinRT size saving options -->
|
||||
<PropertyGroup>
|
||||
<CsWinRTEnableDynamicObjectsSupport>false</CsWinRTEnableDynamicObjectsSupport>
|
||||
<CsWinRTUseExceptionResourceKeys>true</CsWinRTUseExceptionResourceKeys>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- NativeAOT options -->
|
||||
<PropertyGroup>
|
||||
<PublishAot>true</PublishAot>
|
||||
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<StackTraceSupport>false</StackTraceSupport>
|
||||
<OptimizationPreference>Speed</OptimizationPreference>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Primitives" Version="8.2.241221-build.1360" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Media" Version="8.2.241221-build.1360" />
|
||||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
|
||||
|
||||
<!-- Remove all WebView2 assets (transitive from WinUI 2), since we don't need it at all -->
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2903.40" IncludeAssets="none" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.D2D1\ComputeSharp.D2D1.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.SourceGenerators\ComputeSharp.D2D1.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Uwp\ComputeSharp.Uwp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Shared projects for the DX12/D2D1 shaders and the app backend -->
|
||||
<Import Project="..\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems" Label="Shared" />
|
||||
<Import Project="..\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems" Label="Shared" />
|
||||
<Import Project="..\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.projitems" Label="Shared" />
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:ComputeSharp.SwapChain.Uwp.Views"
|
||||
xmlns:win2d="using:Microsoft.Graphics.Canvas.UI.Xaml">
|
||||
|
||||
<Style TargetType="local:D2D1AnimatedPixelShaderPanel">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="local:D2D1AnimatedPixelShaderPanel">
|
||||
<win2d:CanvasAnimatedControl x:Name="PART_CanvasAnimatedControl" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
|
||||
IgnorableNamespaces="uap uap5 mp">
|
||||
|
||||
<Identity
|
||||
Name="e9c6835d-5b29-45c7-ae95-72f09715bc8b"
|
||||
Publisher="CN=Sergio"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="e9c6835d-5b29-45c7-ae95-72f09715bc8b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>ComputeSharp Sample App</DisplayName>
|
||||
<PublisherDisplayName>Sergio Pedri</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="ComputeSharp.SwapChain.Uwp.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="ComputeSharp Sample App"
|
||||
Description="A sample app for ComputeSharp and its UWP shader panels"
|
||||
BackgroundColor="#005491"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square71x71Logo="Assets\SmallTile.png" Square310x310Logo="Assets\LargeTile.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" uap5:Optional="true" BackgroundColor="transparent"/>
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
</Package>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Platform>ARM64</Platform>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
|
||||
<PublishAot>true</PublishAot>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Platform>x64</Platform>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
|
||||
<PublishAot>true</PublishAot>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"profiles": {
|
||||
"ComputeSharp.SwapChain.Uwp": {
|
||||
"commandName": "MsixPackage"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
<UserControl
|
||||
x:Class="ComputeSharp.SwapChain.Uwp.Views.MainView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
|
||||
xmlns:computesharp="using:ComputeSharp.Uwp"
|
||||
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:converters="using:ComputeSharp.SwapChain.Core.Converters"
|
||||
xmlns:enums="using:ComputeSharp.SwapChain.Core.Enums"
|
||||
xmlns:media="using:CommunityToolkit.WinUI.Media"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewModels="using:ComputeSharp.SwapChain.Core.ViewModels"
|
||||
xmlns:views="using:ComputeSharp.SwapChain.Uwp.Views"
|
||||
SizeChanged="UserControl_SizeChanged">
|
||||
|
||||
<Grid x:Name="Root">
|
||||
<Grid.DataContext>
|
||||
<viewModels:MainViewModel x:Name="ViewModel" />
|
||||
</Grid.DataContext>
|
||||
<Grid.Resources>
|
||||
|
||||
<!--
|
||||
Shader selection panel. This is declared as a resource and then added and removed to the visual
|
||||
tree entirely instead of just changing its visibility, so that the loaded panels can detect the
|
||||
change and stop their render loops. This avoids wasting GPU resources when the panel isn't visible.
|
||||
-->
|
||||
<Border
|
||||
x:Key="ShaderSelectionPanel"
|
||||
x:Name="ShaderSelectionPanel"
|
||||
IsTapEnabled="True"
|
||||
Tapped="ShaderSelectionPanel_Tapped">
|
||||
<animations:Implicit.ShowAnimations>
|
||||
<animations:OpacityAnimation
|
||||
From="0"
|
||||
To="1.0"
|
||||
Duration="0:0:0.5" />
|
||||
</animations:Implicit.ShowAnimations>
|
||||
<animations:Implicit.HideAnimations>
|
||||
<animations:OpacityAnimation
|
||||
From="1.0"
|
||||
To="0"
|
||||
Duration="0:0:0.5" />
|
||||
</animations:Implicit.HideAnimations>
|
||||
<Border.Background>
|
||||
<media:AcrylicBrush
|
||||
BlurAmount="12"
|
||||
TextureUri="ms-appx:///Assets/Misc/noise_low.png"
|
||||
TintColor="#FF222222"
|
||||
TintOpacity="0.2" />
|
||||
</Border.Background>
|
||||
|
||||
<!-- Shadow panel with the shaders list -->
|
||||
<Border
|
||||
x:Name="ShadersListContainerPanel"
|
||||
Height="320"
|
||||
Margin="-20,0,-20,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Bottom"
|
||||
Background="#FF222222">
|
||||
<animations:Implicit.ShowAnimations>
|
||||
<animations:TranslationAnimation
|
||||
From="0,320,0"
|
||||
To="0"
|
||||
Duration="0:0:0.5" />
|
||||
</animations:Implicit.ShowAnimations>
|
||||
<animations:Implicit.HideAnimations>
|
||||
<animations:TranslationAnimation
|
||||
From="0"
|
||||
To="0,320,0"
|
||||
Duration="0:0:0.5" />
|
||||
</animations:Implicit.HideAnimations>
|
||||
<ui:Effects.Shadow>
|
||||
<media:AttachedCardShadow
|
||||
BlurRadius="20"
|
||||
CornerRadius="0"
|
||||
Opacity="1"
|
||||
Offset="-12,-2"
|
||||
Color="Black" />
|
||||
</ui:Effects.Shadow>
|
||||
|
||||
<!-- Shaders list -->
|
||||
<ListView
|
||||
ItemsSource="{x:Bind ViewModel.ComputeShaderOptions}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
ScrollViewer.VerticalScrollMode="Disabled"
|
||||
SelectedItem="{x:Bind ViewModel.SelectedComputeShader, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.Resources>
|
||||
|
||||
<!--
|
||||
Lightweight styling to remove the selection background with the accent color, and
|
||||
to remove the padding and stretch the list items to occupy all the available space
|
||||
-->
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundSelected" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundSelectedPointerOver" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundSelectedPressed" Color="Transparent" />
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</Style>
|
||||
</ListView.Resources>
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<ItemsStackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<!-- Shader template -->
|
||||
<DataTemplate x:DataType="viewModels:ShaderRunnerViewModel">
|
||||
<controls:ConstrainedBox
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ui:UIElementExtensions.ClipToBounds="True"
|
||||
AspectRatio="16:9">
|
||||
<Grid>
|
||||
|
||||
<!-- Shader preview -->
|
||||
<computesharp:AnimatedComputeShaderPanel RenderingFailed="SelectionShaderPanel_RenderingFailed" ShaderRunner="{x:Bind ShaderRunner}" />
|
||||
|
||||
<!--
|
||||
Note: here we have a selection property to work around {x:Bind} not working correctly outside of the
|
||||
current template scope. Once that's fixed in WinUI 3, this can be rewritten as a multi-binding like this:
|
||||
Visibility="{x:Bind system:Object.ReferenceEquals((local:ComputeShader), ViewModel.SelectedComputeShader), Mode=OneWay}".
|
||||
When that is working, the ComputeShader.IsSelected property can also be removed, as it will no longer be needed.
|
||||
-->
|
||||
<Border
|
||||
BorderBrush="White"
|
||||
BorderThickness="4"
|
||||
Visibility="{x:Bind IsSelected, Mode=OneWay}">
|
||||
<Polygon
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Fill="White"
|
||||
Points="0,0 32,0 32,32" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</controls:ConstrainedBox>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Border>
|
||||
</Border>
|
||||
</Grid.Resources>
|
||||
|
||||
<!-- Shader switches (for DirectX 12 or Win2D) -->
|
||||
<controls:SwitchPresenter Grid.Row="1" Value="{x:Bind ViewModel.SelectedRenderingMode, Mode=OneWay}">
|
||||
<controls:Case IsDefault="True" Value="{x:Bind enums:RenderingMode.DirectX12}">
|
||||
|
||||
<!-- DirectX 12 shader -->
|
||||
<computesharp:AnimatedComputeShaderPanel
|
||||
IsDynamicResolutionEnabled="{x:Bind ViewModel.IsDynamicResolutionEnabled, Mode=OneWay}"
|
||||
IsPaused="{x:Bind ViewModel.IsRenderingPaused, Mode=OneWay}"
|
||||
IsVerticalSyncEnabled="{x:Bind ViewModel.IsVerticalSyncEnabled, Mode=OneWay}"
|
||||
RenderingFailed="MainShaderPanel_RenderingFailed"
|
||||
ResolutionScale="{x:Bind converters:ResolutionScaleConverter.ConvertPercentageToScale(ViewModel.SelectedResolutionScale), Mode=OneWay}"
|
||||
ShaderRunner="{x:Bind ViewModel.SelectedComputeShader.ShaderRunner, Mode=OneWay}" />
|
||||
</controls:Case>
|
||||
<controls:Case Value="{x:Bind enums:RenderingMode.Win2D}">
|
||||
|
||||
<!-- Win2D shader -->
|
||||
<views:D2D1AnimatedPixelShaderPanel IsPaused="{x:Bind ViewModel.IsRenderingPaused, Mode=OneWay}" PixelShaderEffect="{x:Bind ViewModel.SelectedComputeShader.PixelShaderEffect, Mode=OneWay}" />
|
||||
</controls:Case>
|
||||
</controls:SwitchPresenter>
|
||||
|
||||
<!-- Settings panel -->
|
||||
<StackPanel
|
||||
Margin="48"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Orientation="Horizontal"
|
||||
Spacing="20">
|
||||
|
||||
<!-- Shader pause button -->
|
||||
<Button
|
||||
Padding="20"
|
||||
Command="{x:Bind ViewModel.ToggleRenderingPausedCommand}"
|
||||
CornerRadius="9999"
|
||||
ToolTipService.ToolTip="Select shader">
|
||||
<SymbolIcon Symbol="{x:Bind converters:RenderingPauseConverter.ConvertPausedToSymbol(ViewModel.IsRenderingPaused), Mode=OneWay}" />
|
||||
</Button>
|
||||
|
||||
<!-- Shader selection button -->
|
||||
<Button
|
||||
Padding="20"
|
||||
Click="OpenShaderSelectionPanelButton_Click"
|
||||
CornerRadius="9999"
|
||||
ToolTipService.ToolTip="Select shader">
|
||||
<SymbolIcon Symbol="Pictures" />
|
||||
</Button>
|
||||
|
||||
<!-- Settings button -->
|
||||
<Button
|
||||
Padding="20"
|
||||
CornerRadius="9999"
|
||||
ToolTipService.ToolTip="Settings">
|
||||
<SymbolIcon Symbol="Setting" />
|
||||
<Button.Flyout>
|
||||
<MenuFlyout>
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetRenderingModeCommand}"
|
||||
CommandParameter="{x:Bind enums:RenderingMode.DirectX12}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedRenderingMode.Equals(enums:RenderingMode.DirectX12), Mode=OneWay}"
|
||||
Text="DirectX 12" />
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetRenderingModeCommand}"
|
||||
CommandParameter="{x:Bind enums:RenderingMode.Win2D}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedRenderingMode.Equals(enums:RenderingMode.Win2D), Mode=OneWay}"
|
||||
Text="Win2D (Direct2D)" />
|
||||
<MenuFlyoutSeparator />
|
||||
<ToggleMenuFlyoutItem
|
||||
IsChecked="{x:Bind ViewModel.IsVerticalSyncEnabled, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.SelectedRenderingMode.Equals(enums:RenderingMode.DirectX12), Mode=OneWay}"
|
||||
Text="Vertical sync" />
|
||||
<ToggleMenuFlyoutItem
|
||||
IsChecked="{x:Bind ViewModel.IsDynamicResolutionEnabled, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.SelectedRenderingMode.Equals(enums:RenderingMode.DirectX12), Mode=OneWay}"
|
||||
Text="Dynamic resolution" />
|
||||
<MenuFlyoutSeparator />
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetResolutionScaleCommand}"
|
||||
CommandParameter="{x:Bind ViewModel.ResolutionScaleOptions[0]}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedResolutionScale.Equals(ViewModel.ResolutionScaleOptions[0]), Mode=OneWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsResolutionScaleOptionEnabled, Mode=OneWay}"
|
||||
Text="{x:Bind converters:ResolutionScaleConverter.ConvertPercentageToFormattedString(ViewModel.ResolutionScaleOptions[0])}" />
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetResolutionScaleCommand}"
|
||||
CommandParameter="{x:Bind ViewModel.ResolutionScaleOptions[1]}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedResolutionScale.Equals(ViewModel.ResolutionScaleOptions[1]), Mode=OneWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsResolutionScaleOptionEnabled, Mode=OneWay}"
|
||||
Text="{x:Bind converters:ResolutionScaleConverter.ConvertPercentageToFormattedString(ViewModel.ResolutionScaleOptions[1])}" />
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetResolutionScaleCommand}"
|
||||
CommandParameter="{x:Bind ViewModel.ResolutionScaleOptions[2]}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedResolutionScale.Equals(ViewModel.ResolutionScaleOptions[2]), Mode=OneWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsResolutionScaleOptionEnabled, Mode=OneWay}"
|
||||
Text="{x:Bind converters:ResolutionScaleConverter.ConvertPercentageToFormattedString(ViewModel.ResolutionScaleOptions[2])}" />
|
||||
<ToggleMenuFlyoutItem
|
||||
Command="{x:Bind ViewModel.SetResolutionScaleCommand}"
|
||||
CommandParameter="{x:Bind ViewModel.ResolutionScaleOptions[3]}"
|
||||
IsChecked="{x:Bind ViewModel.SelectedResolutionScale.Equals(ViewModel.ResolutionScaleOptions[3]), Mode=OneWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsResolutionScaleOptionEnabled, Mode=OneWay}"
|
||||
Text="{x:Bind converters:ResolutionScaleConverter.ConvertPercentageToFormattedString(ViewModel.ResolutionScaleOptions[3])}" />
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Info bar -->
|
||||
<muxc:InfoBar
|
||||
x:Name="RenderingErrorInfoBar"
|
||||
Title="Rendering error"
|
||||
Margin="80"
|
||||
Message="There was an error that caused the rendering to fail. Try pausing and starting the rendering again, or restarting the app. If the issue persists, please report it by opening an issue on GitHub."
|
||||
Severity="Error">
|
||||
<muxc:InfoBar.ActionButton>
|
||||
<HyperlinkButton Content="Report the issue" NavigateUri="https://github.com/Sergio0694/ComputeSharp/issues" />
|
||||
</muxc:InfoBar.ActionButton>
|
||||
<animations:Implicit.ShowAnimations>
|
||||
<animations:OpacityAnimation
|
||||
From="0"
|
||||
To="1.0"
|
||||
Duration="0:0:0.5" />
|
||||
<animations:TranslationAnimation
|
||||
From="0,20,0"
|
||||
To="0"
|
||||
Duration="0:0:0.5" />
|
||||
</animations:Implicit.ShowAnimations>
|
||||
<animations:Implicit.HideAnimations>
|
||||
<animations:OpacityAnimation To="0" Duration="0:0:0.5" />
|
||||
<animations:TranslationAnimation To="0,20,0" Duration="0:0:0.5" />
|
||||
</animations:Implicit.HideAnimations>
|
||||
</muxc:InfoBar>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using ComputeSharp.Uwp;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Input;
|
||||
|
||||
namespace ComputeSharp.SwapChain.Uwp.Views;
|
||||
|
||||
/// <summary>
|
||||
/// A view for <see cref="Core.ViewModels.MainViewModel"/>.
|
||||
/// </summary>
|
||||
public sealed partial class MainView : UserControl
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// Opens the shader selection panel
|
||||
private void OpenShaderSelectionPanelButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_ = this.Root.Resources.Remove(nameof(this.ShaderSelectionPanel));
|
||||
|
||||
this.Root.Children.Add(this.ShaderSelectionPanel);
|
||||
}
|
||||
|
||||
// Hides the shader selection panel
|
||||
private void ShaderSelectionPanel_Tapped(object sender, TappedRoutedEventArgs e)
|
||||
{
|
||||
_ = this.Root.Children.Remove(this.ShaderSelectionPanel);
|
||||
}
|
||||
|
||||
// Updates the size of the shaders list panel
|
||||
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
this.ShadersListContainerPanel.Height = Math.Round(e.NewSize.Height * 0.35);
|
||||
}
|
||||
|
||||
// Logs rendering failed in the main panel
|
||||
private void MainShaderPanel_RenderingFailed(AnimatedComputeShaderPanel sender, RenderingFailedEventArgs args)
|
||||
{
|
||||
this.RenderingErrorInfoBar.IsOpen = true;
|
||||
}
|
||||
|
||||
// Logs rendering failed in a secondary panel
|
||||
private void SelectionShaderPanel_RenderingFailed(AnimatedComputeShaderPanel sender, RenderingFailedEventArgs args)
|
||||
{
|
||||
this.RenderingErrorInfoBar.IsOpen = true;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Platforms>x64;arm64</Platforms>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
@@ -52,12 +52,6 @@
|
||||
<OptimizationPreference>Speed</OptimizationPreference>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\ComputeSharp.SwapChain\Textures\RustyMetal.png">
|
||||
<Link>Assets\Textures\RustyMetal.png</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.241112-preview1" />
|
||||
@@ -92,7 +86,8 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Shared projects for the DX12/D2D1 shaders -->
|
||||
<!-- Shared projects for the DX12/D2D1 shaders and the app backend -->
|
||||
<Import Project="..\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems" Label="Shared" />
|
||||
<Import Project="..\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems" Label="Shared" />
|
||||
<Import Project="..\ComputeSharp.SwapChain.UI\ComputeSharp.SwapChain.UI.projitems" Label="Shared" />
|
||||
</Project>
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Platform>arm64</Platform>
|
||||
<Platform>ARM64</Platform>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
|
||||
<PublishAot>true</PublishAot>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<Grid x:Name="Root">
|
||||
<Grid.DataContext>
|
||||
<viewModels:MainViewModel x:Name="ViewModel"/>
|
||||
<viewModels:MainViewModel x:Name="ViewModel" />
|
||||
</Grid.DataContext>
|
||||
<Grid.Resources>
|
||||
|
||||
|
||||