blend state ABI break

main
cosmonaut 2022-02-25 17:51:41 -08:00
parent a828f510af
commit f50295848a
4 changed files with 29 additions and 36 deletions

@ -1 +1 @@
Subproject commit b8b10140a95457a00d658e84d4b67b926f467b15
Subproject commit 32b269526f6e24f695dece00871fec0c5812ca20

BIN
moonlibs/lib64/libRefresh.so.0 (Stored with Git LFS)

Binary file not shown.

View File

@ -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();
}
}
}

View File

@ -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 });