rename Discard to Cycle
parent
43cd8f0182
commit
b283df5d6b
|
@ -133,7 +133,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.BindGraphicsPipeline(drawPipeline);
|
cmdbuf.BindGraphicsPipeline(drawPipeline);
|
||||||
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(texture, sampler));
|
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(texture, sampler));
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
|
|
|
@ -89,8 +89,8 @@ namespace MoonWorks.Test
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(
|
cmdbuf.BeginRenderPass(
|
||||||
new DepthStencilAttachmentInfo(depthStencilTexture, WriteOptions.SafeDiscard, new DepthStencilValue(0, 0), StoreOp.DontCare, StoreOp.DontCare),
|
new DepthStencilAttachmentInfo(depthStencilTexture, WriteOptions.Cycle, new DepthStencilValue(0, 0), StoreOp.DontCare, StoreOp.DontCare),
|
||||||
new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black)
|
new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black)
|
||||||
);
|
);
|
||||||
cmdbuf.BindGraphicsPipeline(maskerPipeline);
|
cmdbuf.BindGraphicsPipeline(maskerPipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(useWireframeMode ? linePipeline : fillPipeline);
|
cmdbuf.BindGraphicsPipeline(useWireframeMode ? linePipeline : fillPipeline);
|
||||||
|
|
||||||
if (useSmallViewport)
|
if (useSmallViewport)
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MoonWorks.Test
|
||||||
backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
|
@ -46,7 +46,7 @@ namespace MoonWorks.Test
|
||||||
backbuffer = cmdbuf.AcquireSwapchainTexture(secondaryWindow);
|
backbuffer = cmdbuf.AcquireSwapchainTexture(secondaryWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Aquamarine));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Aquamarine));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
|
|
|
@ -111,7 +111,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -113,7 +113,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.BindGraphicsPipeline(drawPipeline);
|
cmdbuf.BindGraphicsPipeline(drawPipeline);
|
||||||
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(texture, sampler));
|
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(texture, sampler));
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
|
|
|
@ -157,7 +157,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -402,7 +402,7 @@ namespace MoonWorks.Test
|
||||||
Color clearColor = new Color(sine, sine, sine);
|
Color clearColor = new Color(sine, sine, sine);
|
||||||
|
|
||||||
// Just show a clear screen.
|
// Just show a clear screen.
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchainTexture, WriteOptions.SafeDiscard, clearColor));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchainTexture, WriteOptions.Cycle, clearColor));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -410,14 +410,14 @@ namespace MoonWorks.Test
|
||||||
if (!depthOnlyEnabled)
|
if (!depthOnlyEnabled)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(
|
cmdbuf.BeginRenderPass(
|
||||||
new DepthStencilAttachmentInfo(depthTexture, WriteOptions.SafeDiscard, new DepthStencilValue(1f, 0)),
|
new DepthStencilAttachmentInfo(depthTexture, WriteOptions.Cycle, new DepthStencilValue(1f, 0)),
|
||||||
new ColorAttachmentInfo(swapchainTexture, WriteOptions.SafeDiscard, LoadOp.DontCare)
|
new ColorAttachmentInfo(swapchainTexture, WriteOptions.Cycle, LoadOp.DontCare)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(
|
cmdbuf.BeginRenderPass(
|
||||||
new DepthStencilAttachmentInfo(depthTexture, WriteOptions.SafeDiscard, new DepthStencilValue(1f, 0), StoreOp.Store)
|
new DepthStencilAttachmentInfo(depthTexture, WriteOptions.Cycle, new DepthStencilValue(1f, 0), StoreOp.Store)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
|
|
||||||
// Need to bind a pipeline before binding vertex buffers
|
// Need to bind a pipeline before binding vertex buffers
|
||||||
cmdbuf.BindGraphicsPipeline(CW_CullNonePipeline);
|
cmdbuf.BindGraphicsPipeline(CW_CullNonePipeline);
|
||||||
|
|
|
@ -210,8 +210,8 @@ namespace MoonWorks.Test
|
||||||
// Begin the MSAA RT pass
|
// Begin the MSAA RT pass
|
||||||
int index = (int) currentSampleCount;
|
int index = (int) currentSampleCount;
|
||||||
cmdbuf.BeginRenderPass(
|
cmdbuf.BeginRenderPass(
|
||||||
new DepthStencilAttachmentInfo(depthRTs[index], WriteOptions.SafeDiscard, new DepthStencilValue(1, 0)),
|
new DepthStencilAttachmentInfo(depthRTs[index], WriteOptions.Cycle, new DepthStencilValue(1, 0)),
|
||||||
new ColorAttachmentInfo(renderTargets[index], WriteOptions.SafeDiscard, Color.Black)
|
new ColorAttachmentInfo(renderTargets[index], WriteOptions.Cycle, Color.Black)
|
||||||
);
|
);
|
||||||
cmdbuf.BindGraphicsPipeline(cubePipelines[index]);
|
cmdbuf.BindGraphicsPipeline(cubePipelines[index]);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.BindGraphicsPipeline(graphicsPipeline);
|
cmdbuf.BindGraphicsPipeline(graphicsPipeline);
|
||||||
cmdbuf.BindVertexBuffers(new BufferBinding(vertexBuffer, 0));
|
cmdbuf.BindVertexBuffers(new BufferBinding(vertexBuffer, 0));
|
||||||
cmdbuf.DrawPrimitivesIndirect(drawBuffer, 0, 2, (uint) Marshal.SizeOf<IndirectDrawCommand>());
|
cmdbuf.DrawPrimitivesIndirect(drawBuffer, 0, 2, (uint) Marshal.SizeOf<IndirectDrawCommand>());
|
||||||
|
|
|
@ -120,7 +120,7 @@ namespace MoonWorks.Test
|
||||||
Texture? swapchainTexture = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? swapchainTexture = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (swapchainTexture != null)
|
if (swapchainTexture != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchainTexture, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchainTexture, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -126,12 +126,12 @@ namespace MoonWorks.Test
|
||||||
{
|
{
|
||||||
Texture rt = renderTargets[(int) currentSampleCount];
|
Texture rt = renderTargets[(int) currentSampleCount];
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(rt, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(rt, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(msaaPipelines[(int) currentSampleCount]);
|
cmdbuf.BindGraphicsPipeline(msaaPipelines[(int) currentSampleCount]);
|
||||||
cmdbuf.DrawPrimitives(0, 1);
|
cmdbuf.DrawPrimitives(0, 1);
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, LoadOp.DontCare));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, LoadOp.DontCare));
|
||||||
cmdbuf.BindGraphicsPipeline(blitPipeline);
|
cmdbuf.BindGraphicsPipeline(blitPipeline);
|
||||||
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(rt, rtSampler));
|
cmdbuf.BindFragmentSamplers(new TextureSamplerBinding(rt, rtSampler));
|
||||||
cmdbuf.BindVertexBuffers(quadVertexBuffer);
|
cmdbuf.BindVertexBuffers(quadVertexBuffer);
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace MoonWorks.Test
|
||||||
Texture rt = renderTargets[rtIndex];
|
Texture rt = renderTargets[rtIndex];
|
||||||
ColorAttachmentInfo rtAttachmentInfo = new ColorAttachmentInfo(
|
ColorAttachmentInfo rtAttachmentInfo = new ColorAttachmentInfo(
|
||||||
rt,
|
rt,
|
||||||
WriteOptions.SafeDiscard,
|
WriteOptions.Cycle,
|
||||||
Color.Black
|
Color.Black
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ namespace MoonWorks.Test
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(cubemapPipeline);
|
cmdbuf.BindGraphicsPipeline(cubemapPipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace MoonWorks.Test
|
||||||
public static class TestUtils
|
public static class TestUtils
|
||||||
{
|
{
|
||||||
// change this to test different backends
|
// change this to test different backends
|
||||||
public static Backend[] PreferredBackends = [Backend.Vulkan, Backend.D3D11];
|
public static Backend[] PreferredBackends = [Backend.D3D11];
|
||||||
|
|
||||||
public static WindowCreateInfo GetStandardWindowCreateInfo()
|
public static WindowCreateInfo GetStandardWindowCreateInfo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,19 +92,19 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[0], WriteOptions.SafeDiscard, Color.Red));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[0], WriteOptions.Cycle, Color.Red));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[1], WriteOptions.SafeDiscard, Color.Blue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[1], WriteOptions.Cycle, Color.Blue));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[2], WriteOptions.SafeDiscard, Color.Green));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[2], WriteOptions.Cycle, Color.Green));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[3], WriteOptions.SafeDiscard, Color.Yellow));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(textures[3], WriteOptions.Cycle, Color.Yellow));
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -118,7 +118,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -158,7 +158,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -166,7 +166,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MoonWorks.Test
|
||||||
Texture? swapchain = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? swapchain = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (swapchain != null)
|
if (swapchain != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchain, WriteOptions.SafeDiscard, Color.Blue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(swapchain, WriteOptions.Cycle, Color.Blue));
|
||||||
cmdbuf.BindGraphicsPipeline(fillPipeline);
|
cmdbuf.BindGraphicsPipeline(fillPipeline);
|
||||||
cmdbuf.DrawPrimitives(0, 1);
|
cmdbuf.DrawPrimitives(0, 1);
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -170,7 +170,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.DrawPrimitives(0, 1);
|
cmdbuf.DrawPrimitives(0, 1);
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindVertexSamplers(new TextureSamplerBinding(texture, sampler));
|
cmdbuf.BindVertexSamplers(new TextureSamplerBinding(texture, sampler));
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.CornflowerBlue));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.CornflowerBlue));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.BindVertexBuffers(vertexBuffer);
|
cmdbuf.BindVertexBuffers(vertexBuffer);
|
||||||
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
cmdbuf.BindIndexBuffer(indexBuffer, IndexElementSize.Sixteen);
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace MoonWorks.Test
|
||||||
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
Texture? backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
if (backbuffer != null)
|
if (backbuffer != null)
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.SafeDiscard, Color.Black));
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, WriteOptions.Cycle, Color.Black));
|
||||||
cmdbuf.BindGraphicsPipeline(pipeline);
|
cmdbuf.BindGraphicsPipeline(pipeline);
|
||||||
cmdbuf.DrawPrimitives(0, 1);
|
cmdbuf.DrawPrimitives(0, 1);
|
||||||
cmdbuf.EndRenderPass();
|
cmdbuf.EndRenderPass();
|
||||||
|
|
Loading…
Reference in New Issue