remove explicit RefreshCS

main
cosmonaut 2021-01-20 13:33:03 -08:00
parent 8c8fcde3bc
commit 7367b428cb
3 changed files with 29 additions and 29 deletions

@ -1 +1 @@
Subproject commit 52b60b66f43e8b20192b5cc04211a0f2a183c87d
Subproject commit d22a70c116cf52cfc3ed62499ade660f4d28e8f5

View File

@ -1,4 +1,5 @@
using MoonWorks;
using MoonWorks.Graphics;
namespace MoonWorksTest
{

View File

@ -1,7 +1,6 @@
using MoonWorks;
using MoonWorks.Audio;
using MoonWorks.Graphics;
using RefreshCS;
using System.IO;
using System.Threading;
@ -19,9 +18,9 @@ namespace MoonWorksTest
Buffer vertexBuffer;
RefreshCS.Refresh.Rect renderArea;
RefreshCS.Refresh.Rect flip;
RefreshCS.Refresh.Color clearColor;
Rect renderArea;
Rect flip;
Color clearColor;
Texture mainColorTargetTexture;
TextureSlice mainColorTargetTextureSlice;
@ -80,7 +79,7 @@ namespace MoonWorksTest
vertices[2].u = 0;
vertices[2].v = 0;
vertexBuffer = new Buffer(GraphicsDevice, Refresh.BufferUsageFlags.Vertex, 4 * 5 * 3);
vertexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Vertex, 4 * 5 * 3);
vertexBuffer.SetData(0, vertices, 4 * 5 * 3);
/* Render Pass */
@ -100,12 +99,12 @@ namespace MoonWorksTest
clearColor.b = 57;
clearColor.a = byte.MaxValue;
Refresh.ColorTargetDescription colorTargetDescription = new Refresh.ColorTargetDescription
ColorTargetDescription colorTargetDescription = new ColorTargetDescription
{
format = Refresh.ColorFormat.R8G8B8A8,
multisampleCount = Refresh.SampleCount.One,
loadOp = Refresh.LoadOp.Clear,
storeOp = Refresh.StoreOp.Store
format = ColorFormat.R8G8B8A8,
multisampleCount = SampleCount.One,
loadOp = LoadOp.Clear,
storeOp = StoreOp.Store
};
mainRenderPass = new RenderPass(GraphicsDevice, colorTargetDescription);
@ -114,13 +113,13 @@ namespace MoonWorksTest
GraphicsDevice,
windowWidth,
windowHeight,
Refresh.ColorFormat.R8G8B8A8,
Refresh.TextureUsageFlags.ColorTargetBit
ColorFormat.R8G8B8A8,
TextureUsageFlags.ColorTargetBit
);
mainColorTargetTextureSlice = new TextureSlice(mainColorTargetTexture);
mainColorTarget = new ColorTarget(GraphicsDevice, Refresh.SampleCount.One, ref mainColorTargetTextureSlice);
mainColorTarget = new ColorTarget(GraphicsDevice, SampleCount.One, ref mainColorTargetTextureSlice);
mainFramebuffer = new Framebuffer(
GraphicsDevice,
@ -141,7 +140,7 @@ namespace MoonWorksTest
ColorBlendState colorBlendState = new ColorBlendState
{
LogicOpEnable = false,
LogicOp = Refresh.LogicOp.NoOp,
LogicOp = LogicOp.NoOp,
BlendConstants = new BlendConstants(),
ColorTargetBlendStates = colorTargetBlendStates
};
@ -172,30 +171,30 @@ namespace MoonWorksTest
RasterizerState rasterizerState = RasterizerState.CullCounterClockwise;
var vertexBindings = new Refresh.VertexBinding[1]
var vertexBindings = new VertexBinding[1]
{
new Refresh.VertexBinding
new VertexBinding
{
binding = 0,
inputRate = Refresh.VertexInputRate.Vertex,
inputRate = VertexInputRate.Vertex,
stride = 4 * 5
}
};
var vertexAttributes = new Refresh.VertexAttribute[2]
var vertexAttributes = new VertexAttribute[2]
{
new Refresh.VertexAttribute
new VertexAttribute
{
binding = 0,
location = 0,
format = Refresh.VertexElementFormat.Vector3,
format = VertexElementFormat.Vector3,
offset = 0
},
new Refresh.VertexAttribute
new VertexAttribute
{
binding = 0,
location = 1,
format = Refresh.VertexElementFormat.Vector2,
format = VertexElementFormat.Vector2,
offset = 4 * 3
}
};
@ -206,9 +205,9 @@ namespace MoonWorksTest
VertexAttributes = vertexAttributes
};
var viewports = new Refresh.Viewport[1]
var viewports = new Viewport[1]
{
new Refresh.Viewport
new Viewport
{
x = 0,
y = 0,
@ -219,9 +218,9 @@ namespace MoonWorksTest
}
};
var scissors = new Refresh.Rect[1]
var scissors = new Rect[1]
{
new Refresh.Rect
new Rect
{
x = 0,
y = 0,
@ -245,7 +244,7 @@ namespace MoonWorksTest
multisampleState,
pipelineLayoutCreateInfo,
rasterizerState,
Refresh.PrimitiveType.TriangleList,
PrimitiveType.TriangleList,
vertexInputState,
viewportState,
mainRenderPass
@ -298,7 +297,7 @@ namespace MoonWorksTest
commandBuffer.CopyTextureToBuffer(ref mainColorTargetTextureSlice, screenshotBuffer);
}
commandBuffer.QueuePresent(ref mainColorTargetTextureSlice, ref flip, Refresh.Filter.Nearest);
commandBuffer.QueuePresent(ref mainColorTargetTextureSlice, ref flip, Filter.Nearest);
GraphicsDevice.Submit(commandBuffer);
if (screenshotPressed)