diff --git a/lib/MoonWorks b/lib/MoonWorks index 9df9aae..a5c8ebf 160000 --- a/lib/MoonWorks +++ b/lib/MoonWorks @@ -1 +1 @@ -Subproject commit 9df9aaeb3a7f99ef4f269437f2e32ef6e0daab47 +Subproject commit a5c8ebfc3ae97dcae3ccbdbe3a5bc920b7dca0a6 diff --git a/moonlibs/windows/Refresh.dll b/moonlibs/windows/Refresh.dll index 34a0bf7..8aa4f09 100644 Binary files a/moonlibs/windows/Refresh.dll and b/moonlibs/windows/Refresh.dll differ diff --git a/src/TestGame.cs b/src/TestGame.cs index 999949c..a78de0b 100644 --- a/src/TestGame.cs +++ b/src/TestGame.cs @@ -55,12 +55,10 @@ namespace MoonWorksTest raymarchUniforms.resolutionX = windowWidth; raymarchUniforms.resolutionY = windowHeight; - var textureCommandBuffer = GraphicsDevice.AcquireCommandBuffer(); + var uploadCommandBuffer = GraphicsDevice.AcquireCommandBuffer(); - woodTexture = Texture.LoadPNG(GraphicsDevice, textureCommandBuffer, "Content/woodgrain.png"); - noiseTexture = Texture.LoadPNG(GraphicsDevice, textureCommandBuffer, "Content/noise.png"); - - GraphicsDevice.Submit(textureCommandBuffer); + woodTexture = Texture.LoadPNG(GraphicsDevice, uploadCommandBuffer, "Content/woodgrain.png"); + noiseTexture = Texture.LoadPNG(GraphicsDevice, uploadCommandBuffer, "Content/noise.png"); sampler = new Sampler(GraphicsDevice, SamplerCreateInfo.LinearWrap); @@ -86,7 +84,9 @@ namespace MoonWorksTest vertices[2].v = 0; vertexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Vertex, 4 * 5 * 3); - vertexBuffer.SetData(vertices); + uploadCommandBuffer.SetBufferData(vertexBuffer, vertices); + + GraphicsDevice.Submit(uploadCommandBuffer); /* Render Pass */ @@ -300,7 +300,7 @@ namespace MoonWorksTest new TextureSamplerBinding(noiseTexture, sampler) ); - var fragmentParamOffset = mainGraphicsPipeline.PushFragmentShaderUniforms(raymarchUniforms); + var fragmentParamOffset = commandBuffer.PushFragmentShaderUniforms(raymarchUniforms); commandBuffer.DrawPrimitives(0, 1, 0, fragmentParamOffset); commandBuffer.EndRenderPass();