diff --git a/Source/OpenTK/Platform/Windows/WglHelper.cs b/Source/OpenTK/Platform/Windows/WglHelper.cs index dbdd4dfb..46231aca 100644 --- a/Source/OpenTK/Platform/Windows/WglHelper.cs +++ b/Source/OpenTK/Platform/Windows/WglHelper.cs @@ -24,9 +24,9 @@ namespace OpenTK.Platform.Windows delegatesClass = wglClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic); importsClass = wglClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic); - // Ensure core entry points are ready prior to accessing any method. - // Resolves bug [#993]: "Possible bug in GraphicsContext.CreateDummyContext()" - LoadAll(); + //// Ensure core entry points are ready prior to accessing any method. + //// Resolves bug [#993]: "Possible bug in GraphicsContext.CreateDummyContext()" + //LoadAll(); } #endregion @@ -42,6 +42,8 @@ namespace OpenTK.Platform.Windows private static bool rebuildExtensionList = true; + static readonly object SyncRoot = new object(); + #endregion #region static Delegate LoadDelegate(string name, Type signature) @@ -108,7 +110,10 @@ namespace OpenTK.Platform.Windows /// public static void LoadAll() { - OpenTK.Platform.Utilities.LoadExtensions(typeof(Wgl)); + lock (SyncRoot) + { + OpenTK.Platform.Utilities.LoadExtensions(typeof(Wgl)); + } } #endregion