From: jpbruyere Date: Mon, 15 Feb 2016 21:45:15 +0000 (+0100) Subject: ensure dirtyRects are added if dirtyState not cleared between updates X-Git-Tag: v0.4~127^2~13 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=c8acef28fbf4821b0a966832326fe930600f563e;p=jp%2Fcrow.git ensure dirtyRects are added if dirtyState not cleared between updates --- diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index 48080912..bc5c5cc4 100644 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -351,8 +351,12 @@ namespace Crow clipping.stroke (ctx, Color.Red.AdjustAlpha(0.5)); #endif + if (isDirty) + DirtyRect += clipping.Bounds; + else + DirtyRect = clipping.Bounds; isDirty = true; - DirtyRect = clipping.Bounds; + DirtyRect.Left = Math.Max (0, DirtyRect.Left); DirtyRect.Top = Math.Max (0, DirtyRect.Top); DirtyRect.Width = Math.Min (ClientRectangle.Width - DirtyRect.Left, DirtyRect.Width);