From 1c69f7e07fc9838feda23c79da9f8163bf306899 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 10 Mar 2008 13:25:33 +0000 Subject: [PATCH] Moved GraphicsContext creation to the HandleCreated event. --- Source/OpenTK/Platform/DummyGLContext.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/DummyGLContext.cs b/Source/OpenTK/Platform/DummyGLContext.cs index 59b7a61b..19138de2 100644 --- a/Source/OpenTK/Platform/DummyGLContext.cs +++ b/Source/OpenTK/Platform/DummyGLContext.cs @@ -15,14 +15,16 @@ namespace OpenTK.Platform /// An empty IGraphicsContext implementation to be used inside the Visual Studio designer. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - internal sealed class DummyGLContext : IGraphicsContext + internal sealed class DummyGLContext : IGraphicsContext, IGraphicsContextInternal { GraphicsMode format; bool vsync; + static int dummy_context_count = 0; + IntPtr context; #region --- Constructors --- - public DummyGLContext(GraphicsMode format) { this.format = format; } + public DummyGLContext(GraphicsMode format) { this.format = format; context = new IntPtr(dummy_context_count++); } #endregion @@ -65,5 +67,18 @@ namespace OpenTK.Platform public void Dispose() { } #endregion + + #region IGraphicsContextInternal Members + + public void LoadAll() + { + } + + ContextHandle IGraphicsContextInternal.Context + { + get { return context; } + } + + #endregion } }