diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-12 11:52:50 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-12 11:52:50 +0100 |
| commit | a823099f5db40fb8b2cbe79179185db5266e01e3 (patch) | |
| tree | 43d01d1725726fd93613ef5bb3dbfa6714ef616b /src/OpenTKGameWindow.cs | |
| parent | 83c588a624723742e77db3914259ee37c530bca2 (diff) | |
separate RecreateCache and UpdateCache
Diffstat (limited to 'src/OpenTKGameWindow.cs')
| -rw-r--r-- | src/OpenTKGameWindow.cs | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index e6fc9681..007556bc 100644 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -290,36 +290,20 @@ namespace Crow updateTime.Stop (); drawingTime.Start (); #endif - Debug.WriteLine (redrawClip.ToString ()); - lock (redrawClip) { - if (redrawClip.count > 0) { - #if DEBUG_CLIP_RECTANGLE - redrawClip.stroke (ctx, new Color(1.0,0,0,0.3)); - #endif - redrawClip.clearAndClip (ctx); - //Link.draw (ctx); - foreach (GraphicObject p in invGOList) { - if (!p.Visible) - continue; - - ctx.Save (); - Rectangles clip = redrawClip.intersectingRects (p.Slot); + //Link.draw (ctx); + foreach (GraphicObject p in invGOList) { + if (!p.Visible) + continue; - if (clip.count > 0) - p.Paint (ref ctx); - - ctx.Restore (); + ctx.Save (); - } - ctx.ResetClip (); - #if DEBUG_CLIP_RECTANGLE - redrawClip.stroke (ctx, Color.Red.AdjustAlpha(0.1)); - #endif - redrawClip.Reset (); - } + p.Paint (ref ctx); + + ctx.Restore (); } + #if MEASURE_TIME drawingTime.Stop (); #endif |