public void Render()
{
// Record all the commands we need to render the scene into the command list.
PopulateCommandList();
// Execute the command list.
commandQueue.ExecuteCommandList(commandList);
// Present the frame.
swapChain.Present(1, 0);
WaitForPreviousFrame();
}