diff --git a/Source/OpenTK/Platform/DummyGLContext.cs b/Source/OpenTK/Platform/DummyGLContext.cs new file mode 100644 index 00000000..709d953e --- /dev/null +++ b/Source/OpenTK/Platform/DummyGLContext.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenTK.Platform +{ + /// + /// A dummy GLContext to be used inside the Visual Studio designer. + /// + internal class DummyGLContext : IGLContext + { + #region --- IGLContext Members --- + + public void SwapBuffers() + { + } + + public void MakeCurrent() + { + } + + public IntPtr GetAddress(string function) + { + return IntPtr.Zero; + } + + public IEnumerable GetDisplayModes() + { + throw new Exception("The method or operation is not implemented."); + } + + #endregion + + #region --- IDisposable Members --- + + public void Dispose() + { + } + + #endregion + } +} diff --git a/Source/OpenTK/Platform/DummyGLControl.cs b/Source/OpenTK/Platform/DummyGLControl.cs new file mode 100644 index 00000000..88493fd8 --- /dev/null +++ b/Source/OpenTK/Platform/DummyGLControl.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenTK.Platform +{ + /// + /// A dummy GLControl to be used inside the Visual Studio designer. + /// + internal class DummyGLControl : IGLControl + { + bool fullscreen; + IGLContext glContext = new DummyGLContext(); + + #region --- IGLControl Members --- + + public bool IsIdle + { + get + { + return false; + } + } + + public bool Fullscreen + { + get + { + return fullscreen; + } + set + { + fullscreen = value; + } + } + + public IGLContext Context + { + get + { + return glContext; + } + } + + #endregion + } +}