From e433aad4b40a22a4f607840295cb8d4f105c66b5 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Fri, 25 Apr 2014 14:50:55 +0200 Subject: [PATCH] [ES] ES10 does not require initialization It consists solely of DllImports that will be initialized on first use, regardless of the existence of an OpenGL context. --- Source/OpenTK/Graphics/ES10/Helper.cs | 25 +------------------ .../OpenTK/Platform/DesktopGraphicsContext.cs | 1 - .../OpenTK/Platform/Dummy/DummyGLContext.cs | 1 - .../Platform/EmbeddedGraphicsContext.cs | 1 - 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/Source/OpenTK/Graphics/ES10/Helper.cs b/Source/OpenTK/Graphics/ES10/Helper.cs index 8dbfd270..b911424c 100644 --- a/Source/OpenTK/Graphics/ES10/Helper.cs +++ b/Source/OpenTK/Graphics/ES10/Helper.cs @@ -7,31 +7,8 @@ namespace OpenTK.Graphics.ES10 /// /// Provides access to OpenGL ES 1.0 methods. /// - public sealed partial class GL : GraphicsBindingsBase + public sealed partial class GL { const string Library = "libGLES.dll"; - static readonly object sync_root = new object(); - - #region --- Protected Members --- - - /// - /// Returns a synchronization token unique for the GL class. - /// - protected override object SyncRoot - { - get { return sync_root; } - } - - #endregion - - internal override void LoadEntryPoints() - { - // nothing to do - } - - internal override bool LoadEntryPoint(string function) - { - return true; // nothing to do - } } } diff --git a/Source/OpenTK/Platform/DesktopGraphicsContext.cs b/Source/OpenTK/Platform/DesktopGraphicsContext.cs index a9d4f513..82131c49 100644 --- a/Source/OpenTK/Platform/DesktopGraphicsContext.cs +++ b/Source/OpenTK/Platform/DesktopGraphicsContext.cs @@ -40,7 +40,6 @@ namespace OpenTK.Platform new OpenTK.Graphics.OpenGL.GL().LoadEntryPoints(); new OpenTK.Graphics.OpenGL4.GL().LoadEntryPoints(); - new OpenTK.Graphics.ES10.GL().LoadEntryPoints(); new OpenTK.Graphics.ES11.GL().LoadEntryPoints(); new OpenTK.Graphics.ES20.GL().LoadEntryPoints(); new OpenTK.Graphics.ES30.GL().LoadEntryPoints(); diff --git a/Source/OpenTK/Platform/Dummy/DummyGLContext.cs b/Source/OpenTK/Platform/Dummy/DummyGLContext.cs index 95059613..39819a44 100644 --- a/Source/OpenTK/Platform/Dummy/DummyGLContext.cs +++ b/Source/OpenTK/Platform/Dummy/DummyGLContext.cs @@ -108,7 +108,6 @@ namespace OpenTK.Platform.Dummy { new OpenTK.Graphics.OpenGL.GL().LoadEntryPoints(); new OpenTK.Graphics.OpenGL4.GL().LoadEntryPoints(); - new OpenTK.Graphics.ES10.GL().LoadEntryPoints(); new OpenTK.Graphics.ES11.GL().LoadEntryPoints(); new OpenTK.Graphics.ES20.GL().LoadEntryPoints(); new OpenTK.Graphics.ES30.GL().LoadEntryPoints(); diff --git a/Source/OpenTK/Platform/EmbeddedGraphicsContext.cs b/Source/OpenTK/Platform/EmbeddedGraphicsContext.cs index 1f69ea41..e32f79f8 100644 --- a/Source/OpenTK/Platform/EmbeddedGraphicsContext.cs +++ b/Source/OpenTK/Platform/EmbeddedGraphicsContext.cs @@ -38,7 +38,6 @@ namespace OpenTK.Platform { Stopwatch time = Stopwatch.StartNew(); - new OpenTK.Graphics.ES10.GL().LoadEntryPoints(); new OpenTK.Graphics.ES11.GL().LoadEntryPoints(); new OpenTK.Graphics.ES20.GL().LoadEntryPoints(); new OpenTK.Graphics.ES30.GL().LoadEntryPoints();