From f50295848a21928e44c802cf5f188bbfb5007cd1 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 25 Feb 2022 17:51:41 -0800 Subject: [PATCH] blend state ABI break --- lib/MoonWorks | 2 +- moonlibs/lib64/libRefresh.so.0 | 2 +- src/Program.cs | 32 ++++++++++++++++---------------- src/TestGame.cs | 29 +++++++++++------------------ 4 files changed, 29 insertions(+), 36 deletions(-) diff --git a/lib/MoonWorks b/lib/MoonWorks index b8b1014..32b2695 160000 --- a/lib/MoonWorks +++ b/lib/MoonWorks @@ -1 +1 @@ -Subproject commit b8b10140a95457a00d658e84d4b67b926f467b15 +Subproject commit 32b269526f6e24f695dece00871fec0c5812ca20 diff --git a/moonlibs/lib64/libRefresh.so.0 b/moonlibs/lib64/libRefresh.so.0 index 0d583ce..40d7298 100755 --- a/moonlibs/lib64/libRefresh.so.0 +++ b/moonlibs/lib64/libRefresh.so.0 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb944bc1142b91a8ace4a96b475634affbce23f35047be6f8f36986534ab169e +oid sha256:1d22b974be378ba8875c15f64357883a22d1de36ad740d943fea35bb946e044d size 170792 diff --git a/src/Program.cs b/src/Program.cs index 07e4aa6..0a824b2 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -1,21 +1,21 @@ -using MoonWorks.Window; +using MoonWorks; namespace MoonWorksComputeSpriteBatch { - class Program - { - static void Main(string[] args) - { - WindowCreateInfo windowCreateInfo = new WindowCreateInfo - { - WindowTitle = "Compute Sprite Batch", - WindowWidth = 1280, - WindowHeight = 720, - ScreenMode = ScreenMode.Windowed - }; + class Program + { + static void Main(string[] args) + { + WindowCreateInfo windowCreateInfo = new WindowCreateInfo + { + WindowTitle = "Compute Sprite Batch", + WindowWidth = 1280, + WindowHeight = 720, + ScreenMode = ScreenMode.Windowed + }; - TestGame game = new TestGame(windowCreateInfo, MoonWorks.Graphics.PresentMode.FIFO, 60, true); - game.Run(); - } - } + TestGame game = new TestGame(windowCreateInfo, MoonWorks.Graphics.PresentMode.FIFO, 60, true); + game.Run(); + } + } } diff --git a/src/TestGame.cs b/src/TestGame.cs index 253ebf2..e2fe31d 100644 --- a/src/TestGame.cs +++ b/src/TestGame.cs @@ -5,7 +5,6 @@ using System.Runtime.InteropServices; using MoonWorks; using MoonWorks.Graphics; using MoonWorks.Math; -using MoonWorks.Window; namespace MoonWorksComputeSpriteBatch { @@ -46,17 +45,11 @@ namespace MoonWorksComputeSpriteBatch /* Pipeline */ - ColorTargetBlendState[] colorTargetBlendStates = new ColorTargetBlendState[1] - { - ColorTargetBlendState.None - }; - ColorBlendState colorBlendState = new ColorBlendState { LogicOpEnable = false, LogicOp = LogicOp.NoOp, - BlendConstants = new BlendConstants(), - ColorTargetBlendStates = colorTargetBlendStates + BlendConstants = new BlendConstants() }; DepthStencilState depthStencilState = DepthStencilState.Disable; @@ -160,17 +153,17 @@ namespace MoonWorksComputeSpriteBatch { new ColorAttachmentDescription { - format = TextureFormat.R8G8B8A8, - sampleCount = SampleCount.One + Format = TextureFormat.R8G8B8A8, + SampleCount = SampleCount.One, + BlendState = ColorAttachmentBlendState.None } }; GraphicsPipelineAttachmentInfo graphicsPipelineAttachmentInfo = new GraphicsPipelineAttachmentInfo { - colorAttachmentDescriptions = colorAttachmentDescriptions, - colorAttachmentCount = 1, - hasDepthStencilAttachment = false, - depthStencilFormat = 0 + ColorAttachmentDescriptions = colorAttachmentDescriptions, + HasDepthStencilAttachment = false, + DepthStencilFormat = 0 }; var graphicsPipelineCreateInfo = new GraphicsPipelineCreateInfo @@ -226,10 +219,10 @@ namespace MoonWorksComputeSpriteBatch var colorAttachmentInfo = new ColorAttachmentInfo { - renderTarget = mainColorTarget, - clearColor = Color.Black, - loadOp = LoadOp.Clear, - storeOp = StoreOp.DontCare + RenderTarget = mainColorTarget, + ClearColor = Color.Black, + LoadOp = LoadOp.Clear, + StoreOp = StoreOp.DontCare }; spriteBatch.Flush(commandBuffer, colorAttachmentInfo, spritePipeline, new CameraUniforms { viewProjectionMatrix = viewProjection });