update ClearScreen_MultiWindow
parent
b50df03dd7
commit
329f3c68f4
|
@ -23,23 +23,29 @@ namespace MoonWorks.Test
|
||||||
CommandBuffer cmdbuf;
|
CommandBuffer cmdbuf;
|
||||||
Texture? backbuffer;
|
Texture? backbuffer;
|
||||||
|
|
||||||
cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
if (MainWindow.Claimed)
|
||||||
backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
|
||||||
if (backbuffer != null)
|
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, Color.CornflowerBlue));
|
cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
||||||
cmdbuf.EndRenderPass();
|
backbuffer = cmdbuf.AcquireSwapchainTexture(MainWindow);
|
||||||
|
if (backbuffer != null)
|
||||||
|
{
|
||||||
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, Color.CornflowerBlue));
|
||||||
|
cmdbuf.EndRenderPass();
|
||||||
|
}
|
||||||
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
|
||||||
|
|
||||||
cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
if (secondaryWindow.Claimed)
|
||||||
backbuffer = cmdbuf.AcquireSwapchainTexture(secondaryWindow);
|
|
||||||
if (backbuffer != null)
|
|
||||||
{
|
{
|
||||||
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, Color.Aquamarine));
|
cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
||||||
cmdbuf.EndRenderPass();
|
backbuffer = cmdbuf.AcquireSwapchainTexture(secondaryWindow);
|
||||||
|
if (backbuffer != null)
|
||||||
|
{
|
||||||
|
cmdbuf.BeginRenderPass(new ColorAttachmentInfo(backbuffer, Color.Aquamarine));
|
||||||
|
cmdbuf.EndRenderPass();
|
||||||
|
}
|
||||||
|
GraphicsDevice.Submit(cmdbuf);
|
||||||
}
|
}
|
||||||
GraphicsDevice.Submit(cmdbuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
|
|
Loading…
Reference in New Issue