From 3d0217dc7dbbacc5ced8b183c51ef09b61ee4f4d Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 2 Aug 2022 00:57:52 +0200 Subject: [PATCH] Add missing ContouredLayers sample --- samples/ComputeSharp.SwapChain/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/ComputeSharp.SwapChain/Program.cs b/samples/ComputeSharp.SwapChain/Program.cs index 3e54f1ef..29381a57 100644 --- a/samples/ComputeSharp.SwapChain/Program.cs +++ b/samples/ComputeSharp.SwapChain/Program.cs @@ -11,7 +11,7 @@ class Program /// /// A texture for \Textures\RustyMetal.png. /// - private static readonly IReadOnlyNormalizedTexture2D RustyMetal = LoadTexture(); + private static readonly Lazy> RustyMetal = new(static () => LoadTexture()); /// /// The mapping of available samples to choose from. @@ -28,7 +28,8 @@ class Program (nameof(ProteanClouds), new SwapChainApplication(static time => new((float)time.TotalSeconds))), (nameof(ExtrudedTruchetPattern), new SwapChainApplication(static time => new((float)time.TotalSeconds))), (nameof(PyramidPattern), new SwapChainApplication(static time => new((float)time.TotalSeconds))), - (nameof(TriangleGridContouring), new SwapChainApplication(static time => new((float)time.TotalSeconds))) + (nameof(TriangleGridContouring), new SwapChainApplication(static time => new((float)time.TotalSeconds))), + (nameof(ContouredLayers), new SwapChainApplication(static time => new((float)time.TotalSeconds, RustyMetal.Value))) }; static void Main()