From 518dadb188f333c8b0d25c2945f74be13be1f1ce Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 27 Jan 2008 14:29:15 +0000 Subject: [PATCH] call Form.Update() on each fade effect step. --- Source/OpenTK/Graphics/DisplayDevice.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Graphics/DisplayDevice.cs b/Source/OpenTK/Graphics/DisplayDevice.cs index 6e67cd69..ed2b6d61 100644 --- a/Source/OpenTK/Graphics/DisplayDevice.cs +++ b/Source/OpenTK/Graphics/DisplayDevice.cs @@ -316,7 +316,7 @@ namespace OpenTK.Graphics class FadeEffect : IDisposable { List
forms = new List(); - double opacity_step = 0.05; + double opacity_step = 0.04; int sleep_step; internal FadeEffect() @@ -382,7 +382,10 @@ namespace OpenTK.Graphics while (!FadedOut) { foreach (Form form in forms) + { form.Opacity += opacity_step; + form.Update(); + } Thread.Sleep(sleep_step); } } @@ -397,7 +400,10 @@ namespace OpenTK.Graphics while (!FadedIn) { foreach (Form form in forms) + { form.Opacity -= opacity_step; + form.Update(); + } Thread.Sleep(sleep_step); }