diff --git a/FinalEngine.Examples.Sponza/Program.cs b/FinalEngine.Examples.Sponza/Program.cs index 03d783f6..6d271962 100644 --- a/FinalEngine.Examples.Sponza/Program.cs +++ b/FinalEngine.Examples.Sponza/Program.cs @@ -81,7 +81,7 @@ private static void Main() var watch = new Stopwatch(); var watchInvoker = new StopwatchInvoker(watch); - var gameTime = new GameTime(watchInvoker, 10000.0f); + var gameTime = new GameTime(watchInvoker, 120.0f); float fieldDepth = 10.0f; float fieldWidth = 10.0f; @@ -189,7 +189,7 @@ private static void Main() back, front); - skyboxRenderer.SetSkybox(cubeTexture); + //skyboxRenderer.SetSkybox(cubeTexture); var controller = new ImGuiController(window.ClientSize.Width, window.ClientSize.Height); @@ -223,17 +223,17 @@ private static void Main() geometryRenderer.Enqueue(model); - for (var i = 0; i < 5; i++) - { - for (var j = 0; j < 5; j++) - { - lightRenderer.Enqueue(new Light() - { - Type = LightType.Point, - Position = new Vector3((i * 20) - 100, 4, (j * 20) - 50), - }); - } - } + ////for (var i = 0; i < 5; i++) + ////{ + //// for (var j = 0; j < 5; j++) + //// { + //// lightRenderer.Enqueue(new Light() + //// { + //// Type = LightType.Point, + //// Position = new Vector3((i * 20) - 100, 4, (j * 20) - 50), + //// }); + //// } + ////} renderingEngine.Render(camera); diff --git a/FinalEngine.Rendering/FinalEngine.Rendering.csproj b/FinalEngine.Rendering/FinalEngine.Rendering.csproj index 6798a12f..a7d46d9f 100644 --- a/FinalEngine.Rendering/FinalEngine.Rendering.csproj +++ b/FinalEngine.Rendering/FinalEngine.Rendering.csproj @@ -21,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/FinalEngine.Rendering/Loaders/Textures/Texture2DResourceLoader.cs b/FinalEngine.Rendering/Loaders/Textures/Texture2DResourceLoader.cs index fb2519f3..0fc1aec4 100644 --- a/FinalEngine.Rendering/Loaders/Textures/Texture2DResourceLoader.cs +++ b/FinalEngine.Rendering/Loaders/Textures/Texture2DResourceLoader.cs @@ -52,15 +52,18 @@ public override ITexture2D LoadResource(string filePath) for (int y = 0; y < image.Height; y++) { - var row = image.GetPixelRowSpan(y); - - for (int x = 0; x < image.Width; x++) + image.ProcessPixelRows(processor => { - pixels.Add(row[x].R); - pixels.Add(row[x].G); - pixels.Add(row[x].B); - pixels.Add(row[x].A); - } + for (int x = 0; x < image.Width; x++) + { + var pixel = processor.GetRowSpan(y); + + pixels.Add(pixel[x].R); + pixels.Add(pixel[x].G); + pixels.Add(pixel[x].B); + pixels.Add(pixel[x].A); + } + }); } var rasterState = this.renderDevice.Rasterizer.GetRasterState(); diff --git a/FinalEngine.Tests/FinalEngine.Tests.csproj b/FinalEngine.Tests/FinalEngine.Tests.csproj index 02e4f684..159a6d39 100644 --- a/FinalEngine.Tests/FinalEngine.Tests.csproj +++ b/FinalEngine.Tests/FinalEngine.Tests.csproj @@ -30,7 +30,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive