From 8cc99350de81254725fa9f425085fecc48ccfd07 Mon Sep 17 00:00:00 2001 From: kanato Date: Tue, 3 Feb 2009 08:21:52 +0000 Subject: [PATCH] Minor refactoring and commenting in AglContext.cs. --- Source/OpenTK/Platform/MacOS/AglContext.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/OpenTK/Platform/MacOS/AglContext.cs b/Source/OpenTK/Platform/MacOS/AglContext.cs index 55f640a2..2cc923a3 100644 --- a/Source/OpenTK/Platform/MacOS/AglContext.cs +++ b/Source/OpenTK/Platform/MacOS/AglContext.cs @@ -262,13 +262,16 @@ namespace OpenTK.Platform.MacOS #region IGraphicsContext Members - bool first = false; + + bool firstSwap = false; public void SwapBuffers() { - if (first == false && carbonWindow.IsControl) + // this is part of the hack to avoid dropping the first frame when + // using multiple GLControls. + if (firstSwap == false && carbonWindow.IsControl) { Debug.WriteLine("--> Resetting drawable. <--"); - first = true; + firstSwap = true; SetDrawable(carbonWindow); Update(carbonWindow); }