diff --git a/examples/CubeReflection.cpp b/examples/CubeReflection.cpp index d925a45b49..efd810993f 100644 --- a/examples/CubeReflection.cpp +++ b/examples/CubeReflection.cpp @@ -280,9 +280,10 @@ void frame() { GetNextRenderPassDescriptor(device, swapchain, depthStencilView, &backbuffer, &renderPass); nxt::CommandBuffer commands = device.CreateCommandBufferBuilder() + .TransitionBufferUsage(cameraBuffer, nxt::BufferUsageBit::Uniform) + .BeginRenderPass(renderPass) .SetRenderPipeline(pipeline) - .TransitionBufferUsage(cameraBuffer, nxt::BufferUsageBit::Uniform) .SetBindGroup(0, bindGroup[0]) .SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets) .SetIndexBuffer(indexBuffer, 0)