public bool Redraw(int width, int height) { bool anyNeedsRedraw = false; foreach (var control in controls) { anyNeedsRedraw |= control.NeedsRedraw; } if (anyNeedsRedraw) { //Debug.WriteLine("REDRAW!"); #if FAMISTUDIO_LINUX GL.Viewport(0, 0, width, height); GL.Clear(ClearBufferMask.ColorBufferBit); // Tentative fix for a bug when NSF dialog is open that I can no longer repro. if (controls[0].App.Project == null) { return(true); } #endif foreach (var control in controls) { gfx.BeginDraw(control, height); control.Render(gfx); control.Validate(); gfx.EndDraw(); } return(true); } return(false); }
public bool Redraw() { bool anyNeedsRedraw = false; foreach (var control in controls) { anyNeedsRedraw |= control.NeedsRedraw; } if (anyNeedsRedraw) { //Debug.WriteLine($"REDRAW! {width} {height}"); GL.Viewport(0, 0, width, height); //GL.ClearColor(1.0f, (float)rnd.NextDouble(), 1.0f, 1.0f); //GL.Clear(ClearBufferMask.ColorBufferBit); // Tentative fix for a bug when NSF dialog is open that I can no longer repro. if (controls[0].App.Project == null) { return(true); } foreach (var control in controls) { gfx.BeginDraw(control, height); control.Render(gfx); control.Validate(); gfx.EndDraw(); } return(true); } return(false); }