public override void Refresh() { var s = (VeldridSurface)Content; BackEnd.CommandList = BackEnd.Factory.CreateCommandList(); BackEnd.CommandList.Begin(); BackEnd.CommandList.SetFramebuffer(s.Swapchain.Framebuffer); BackEnd.CommandList.ClearColorTarget(0, ClearColor); BackEnd.CommandList.ClearDepthStencil(1.0f); if (Map != null && Map.InitializedInBackEnd) { Camera.AspectRatio = (float)Width / (float)Height; BackEnd.DrawMap(Map, this, Camera); } BackEnd.CommandList.End(); s.GraphicsDevice.SubmitCommands(BackEnd.CommandList); s.GraphicsDevice.SwapBuffers(s.Swapchain); BackEnd.CommandList.Dispose(); }
public override void Refresh() { GL.Viewport(0, 0, Width, Height); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); if (Map != null && Map.InitializedInBackEnd) { Camera.AspectRatio = (float)Width / (float)Height; BackEnd.DrawMap(Map, this, Camera); } ((GLSurface)Content).SwapBuffers(); }