From 951f14f4590e70f8ea9953a151c6d42a23d42813 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 21 Aug 2007 12:21:01 +0000 Subject: [PATCH] Corrected a bug where GL.LoadAll wasn't called on time in X11GLNative. Moved MakeCurrent call to X11GLNative and WinGLNative, instead of GameWindow. --- Source/OpenTK/GameWindow.cs | 2 +- Source/OpenTK/Platform/Windows/WinGLNative.cs | 2 ++ Source/OpenTK/Platform/X11/X11GLNative.cs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 6dce8472..21d1f3d6 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -212,7 +212,7 @@ namespace OpenTK Debug.Print(expt.ToString()); throw; } - OpenTK.OpenGL.GL.LoadAll(); + //OpenTK.OpenGL.GL.LoadAll(); } else { diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 2ed8b978..900904ed 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -290,6 +290,8 @@ namespace OpenTK.Platform.Windows glContext = new WinGLContext(this.mode); glContext.PrepareContext(this.Handle); glContext.CreateContext(); + //glContext.MakeCurrent(); + OpenTK.OpenGL.GL.LoadAll(); } catch (ApplicationException expt) { diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index 355cd0bc..76f1acef 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -309,6 +309,8 @@ namespace OpenTK.Platform.X11 API.MapRaised(window.Display, window.Handle); + OpenTK.OpenGL.GL.LoadAll(); + Debug.Unindent(); Debug.WriteLine("GameWindow creation completed successfully!"); exists = true;