From 45a0efd9d10018b30f901585d8ee9b9468efe7d0 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 2 Sep 2007 23:04:11 +0000 Subject: [PATCH] Removed redudant GL.LoadAll call in WinGLNative Added Glu.LoadAll call to GLControl.cs --- Source/OpenTK/GLControl.cs | 4 +++- Source/OpenTK/Platform/Windows/WinGLNative.cs | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index 720ca944..8998729f 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -15,6 +15,7 @@ using System.Windows.Forms; using System.Diagnostics; using OpenTK.Platform; +using OpenTK.OpenGL; #endregion @@ -100,7 +101,8 @@ namespace OpenTK this.Visible = true; - OpenTK.OpenGL.GL.LoadAll(); + GL.LoadAll(); + Glu.LoadAll(); this.OnResize(EventArgs.Empty); } diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 382e4e43..3d970fe9 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -299,15 +299,14 @@ namespace OpenTK.Platform.Windows glContext.PrepareContext(this.Handle); glContext.CreateContext(); //glContext.MakeCurrent(); - OpenTK.OpenGL.GL.LoadAll(); + GL.LoadAll(); + Glu.LoadAll(); } catch (ApplicationException expt) { Debug.Print("Could not create opengl context, error: {0}", expt.ToString()); throw; } - GL.LoadAll(); - Glu.LoadAll(); if (this.Create != null) {