Added DummyGLContext.cs amd DummyGLControl.cs drivers.

This commit is contained in:
the_fiddler 2007-09-02 08:09:01 +00:00
parent 6ddd024fbf
commit 7403987e5c
2 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenTK.Platform
{
/// <summary>
/// A dummy GLContext to be used inside the Visual Studio designer.
/// </summary>
internal class DummyGLContext : IGLContext
{
#region --- IGLContext Members ---
public void SwapBuffers()
{
}
public void MakeCurrent()
{
}
public IntPtr GetAddress(string function)
{
return IntPtr.Zero;
}
public IEnumerable<DisplayMode> GetDisplayModes()
{
throw new Exception("The method or operation is not implemented.");
}
#endregion
#region --- IDisposable Members ---
public void Dispose()
{
}
#endregion
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenTK.Platform
{
/// <summary>
/// A dummy GLControl to be used inside the Visual Studio designer.
/// </summary>
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
}
}