diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 8408de20e..08b74376c 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -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 diff --git a/nuget.config b/nuget.config index 0e585fb06..761d3ab3f 100644 --- a/nuget.config +++ b/nuget.config @@ -3,5 +3,6 @@ + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.D2D1.Uwp/ComputeSharp.SwapChain.D2D1.Uwp.csproj b/samples/ComputeSharp.SwapChain.D2D1.Uwp/ComputeSharp.SwapChain.D2D1.Uwp.csproj index a1109e4d9..daba2a8e8 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.Uwp/ComputeSharp.SwapChain.D2D1.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.D2D1.Uwp/ComputeSharp.SwapChain.D2D1.Uwp.csproj @@ -5,7 +5,7 @@ 10.0.17763.0 10.0.22621.57 true - x64;arm64 + x64;ARM64 win-x64;win-arm64 en-US win-$(Platform).pubxml diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LockScreenLogo.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/LockScreenLogo.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/LockScreenLogo.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/LockScreenLogo.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Misc/noise_low.png b/samples/ComputeSharp.SwapChain.UI/Assets/Misc/noise_low.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Misc/noise_low.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Misc/noise_low.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-16.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-16.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-16.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-16.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-256.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-256.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-256.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-256.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-32.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-32.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-32.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-32.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-48.png b/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-48.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-48.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-48.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.backup.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.backup.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.backup.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.backup.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-100.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-100.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-100.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-125.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-125.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-125.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-150.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-150.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-150.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-200.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-200.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-400.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-400.png rename to samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-400.png diff --git a/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.projitems b/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.projitems new file mode 100644 index 000000000..dbe456796 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.projitems @@ -0,0 +1,78 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 6bc471c6-72f9-43cf-ae1e-f6d3e5ed3129 + + + ComputeSharp.SwapChain.UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.shproj b/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.shproj new file mode 100644 index 000000000..509c4d3f5 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.UI/ComputeSharp.SwapChain.UI.shproj @@ -0,0 +1,13 @@ + + + + 6bc471c6-72f9-43cf-ae1e-f6d3e5ed3129 + 14.0 + + + + + + + + diff --git a/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs b/samples/ComputeSharp.SwapChain.UI/Controls/D2D1AnimatedPixelShaderPanel.cs similarity index 97% rename from samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs rename to samples/ComputeSharp.SwapChain.UI/Controls/D2D1AnimatedPixelShaderPanel.cs index 654da8bc6..bbde76984 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs +++ b/samples/ComputeSharp.SwapChain.UI/Controls/D2D1AnimatedPixelShaderPanel.cs @@ -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 /// /// A custom that can be used to render animated backgrounds via Win2D. diff --git a/samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs b/samples/ComputeSharp.SwapChain.UI/Converters/RenderingPauseConverter.cs similarity index 90% rename from samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs rename to samples/ComputeSharp.SwapChain.UI/Converters/RenderingPauseConverter.cs index 8420af173..0888d6e14 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs +++ b/samples/ComputeSharp.SwapChain.UI/Converters/RenderingPauseConverter.cs @@ -1,4 +1,8 @@ +#if WINDOWS_UWP +using Windows.UI.Xaml.Controls; +#else using Microsoft.UI.Xaml.Controls; +#endif namespace ComputeSharp.SwapChain.Core.Converters; diff --git a/samples/ComputeSharp.SwapChain.WinUI/Converters/ResolutionScaleConverter.cs b/samples/ComputeSharp.SwapChain.UI/Converters/ResolutionScaleConverter.cs similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Converters/ResolutionScaleConverter.cs rename to samples/ComputeSharp.SwapChain.UI/Converters/ResolutionScaleConverter.cs diff --git a/samples/ComputeSharp.SwapChain.WinUI/Enums/RenderingMode.cs b/samples/ComputeSharp.SwapChain.UI/Enums/RenderingMode.cs similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Enums/RenderingMode.cs rename to samples/ComputeSharp.SwapChain.UI/Enums/RenderingMode.cs diff --git a/samples/ComputeSharp.SwapChain.WinUI/Shaders/PixelShaderEffect.cs b/samples/ComputeSharp.SwapChain.UI/Shaders/PixelShaderEffect.cs similarity index 98% rename from samples/ComputeSharp.SwapChain.WinUI/Shaders/PixelShaderEffect.cs rename to samples/ComputeSharp.SwapChain.UI/Shaders/PixelShaderEffect.cs index 69f2a8e8c..a66fc56ac 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Shaders/PixelShaderEffect.cs +++ b/samples/ComputeSharp.SwapChain.UI/Shaders/PixelShaderEffect.cs @@ -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; diff --git a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs b/samples/ComputeSharp.SwapChain.UI/Shaders/Runners/ContouredLayersRunner.cs similarity index 95% rename from samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs rename to samples/ComputeSharp.SwapChain.UI/Shaders/Runners/ContouredLayersRunner.cs index 261f1ce47..4c6fd817f 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs +++ b/samples/ComputeSharp.SwapChain.UI/Shaders/Runners/ContouredLayersRunner.cs @@ -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; diff --git a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/D2D1ContouredLayersRunner.cs b/samples/ComputeSharp.SwapChain.UI/Shaders/Runners/D2D1ContouredLayersRunner.cs similarity index 98% rename from samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/D2D1ContouredLayersRunner.cs rename to samples/ComputeSharp.SwapChain.UI/Shaders/Runners/D2D1ContouredLayersRunner.cs index 70c2ec390..5a1d5db96 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/D2D1ContouredLayersRunner.cs +++ b/samples/ComputeSharp.SwapChain.UI/Shaders/Runners/D2D1ContouredLayersRunner.cs @@ -2,7 +2,11 @@ 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; diff --git a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs b/samples/ComputeSharp.SwapChain.UI/ViewModels/MainViewModel.cs similarity index 99% rename from samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs rename to samples/ComputeSharp.SwapChain.UI/ViewModels/MainViewModel.cs index e9dd941b3..89d42abda 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs +++ b/samples/ComputeSharp.SwapChain.UI/ViewModels/MainViewModel.cs @@ -5,7 +5,11 @@ 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) diff --git a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/ShaderRunnerViewModel.cs b/samples/ComputeSharp.SwapChain.UI/ViewModels/ShaderRunnerViewModel.cs similarity index 96% rename from samples/ComputeSharp.SwapChain.WinUI/ViewModels/ShaderRunnerViewModel.cs rename to samples/ComputeSharp.SwapChain.UI/ViewModels/ShaderRunnerViewModel.cs index 443689ec6..eac80e847 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/ShaderRunnerViewModel.cs +++ b/samples/ComputeSharp.SwapChain.UI/ViewModels/ShaderRunnerViewModel.cs @@ -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; diff --git a/samples/ComputeSharp.SwapChain.Uwp/App.xaml b/samples/ComputeSharp.SwapChain.Uwp/App.xaml new file mode 100644 index 000000000..9ee3a3dc3 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/App.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs new file mode 100644 index 000000000..d60363dbf --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs @@ -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; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +sealed partial class App : Application +{ + /// + /// 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(). + /// + public App() + { + InitializeComponent(); + } + + /// + 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(); + } + } + + /// + /// Styles the title bar buttons according to the theme in use + /// + 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); + } + + /// + /// Sets up the app UI to be expanded into the title bar + /// + private static void ExpandViewIntoTitleBar() + { + CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; + + coreTitleBar.ExtendViewIntoTitleBar = true; + } +} \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj new file mode 100644 index 000000000..39f81549b --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -0,0 +1,73 @@ + + + WinExe + net8.0-windows10.0.26100.0 + 10.0.17763.0 + 10.0.26100.57 + true + x64;ARM64 + win-x64;win-arm64 + $(DefineConstants);WINDOWS_UWP + en-US + true + win-$(Platform).pubxml + true + + + false + + + + + + + + + + false + true + 2 + + + + + false + true + + + + + true + true + true + false + Speed + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Controls/D2D1AnimatedPixelShaderPanel.xaml b/samples/ComputeSharp.SwapChain.Uwp/Controls/D2D1AnimatedPixelShaderPanel.xaml new file mode 100644 index 000000000..b7c172e8f --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Controls/D2D1AnimatedPixelShaderPanel.xaml @@ -0,0 +1,16 @@ + + + + diff --git a/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest b/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest new file mode 100644 index 000000000..f12fcf8c9 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + + ComputeSharp Sample App + Sergio Pedri + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-arm64.pubxml b/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-arm64.pubxml new file mode 100644 index 000000000..5de0b991a --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-arm64.pubxml @@ -0,0 +1,11 @@ + + + + FileSystem + ARM64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + true + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-x64.pubxml b/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 000000000..89844a876 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,11 @@ + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + true + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/launchSettings.json b/samples/ComputeSharp.SwapChain.Uwp/Properties/launchSettings.json new file mode 100644 index 000000000..46264d2b4 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "ComputeSharp.SwapChain.Uwp": { + "commandName": "MsixPackage" + } + } +} \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml new file mode 100644 index 000000000..ec299cb02 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs new file mode 100644 index 000000000..756d53297 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs @@ -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; + +/// +/// A view for . +/// +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; + } +} \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 0eedabe4e..e2b8035aa 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -5,7 +5,7 @@ 10.0.17763.0 10.0.22621.57 app.manifest - x64;arm64 + x64;ARM64 win-x64;win-arm64 win-$(Platform).pubxml true @@ -52,12 +52,6 @@ Speed - - - Assets\Textures\RustyMetal.png - - - @@ -92,7 +86,8 @@ - + + diff --git a/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-arm64.pubxml b/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-arm64.pubxml index 1c02b7f79..5de0b991a 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-arm64.pubxml +++ b/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-arm64.pubxml @@ -2,7 +2,7 @@ FileSystem - arm64 + ARM64 win-arm64 bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ true diff --git a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml index 868669010..9f0df1a0e 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml +++ b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml @@ -15,7 +15,7 @@ - +