From 7403987e5c9d1e4faa1ec7351603f2fcacc6ed4a Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 2 Sep 2007 08:09:01 +0000 Subject: [PATCH] Added DummyGLContext.cs amd DummyGLControl.cs drivers. --- Source/OpenTK/Platform/DummyGLContext.cs | 42 +++++++++++++++++++++ Source/OpenTK/Platform/DummyGLControl.cs | 47 ++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 Source/OpenTK/Platform/DummyGLContext.cs create mode 100644 Source/OpenTK/Platform/DummyGLControl.cs 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 + } +}