2007-09-09 18:07:39 +02:00
|
|
|
|
#region --- License ---
|
|
|
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
|
|
|
* See license.txt for license info
|
|
|
|
|
*/
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
using System;
|
2007-09-02 10:09:01 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace OpenTK.Platform
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2007-09-09 13:53:25 +02:00
|
|
|
|
/// An empty IGLContext implementation to be used inside the Visual Studio designer.
|
2007-12-09 19:15:51 +01:00
|
|
|
|
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
2007-09-02 10:09:01 +02:00
|
|
|
|
/// </summary>
|
2007-09-09 13:53:25 +02:00
|
|
|
|
internal sealed class DummyGLContext : IGLContext
|
2007-09-02 10:09:01 +02:00
|
|
|
|
{
|
2007-09-09 17:10:21 +02:00
|
|
|
|
WindowInfo info = new WindowInfo();
|
2007-10-15 13:16:20 +02:00
|
|
|
|
DisplayMode mode;
|
|
|
|
|
bool vsync;
|
|
|
|
|
|
|
|
|
|
#region --- Constructors ---
|
|
|
|
|
|
|
|
|
|
public DummyGLContext(DisplayMode m) { mode = m; }
|
|
|
|
|
|
|
|
|
|
#endregion
|
2007-09-09 17:10:21 +02:00
|
|
|
|
|
2007-09-02 10:09:01 +02:00
|
|
|
|
#region --- IGLContext Members ---
|
|
|
|
|
|
2007-09-09 17:10:21 +02:00
|
|
|
|
public IntPtr Context { get { return IntPtr.Zero; } }
|
|
|
|
|
public IWindowInfo Info { get { return info; } }
|
|
|
|
|
public DisplayMode Mode { get { return mode; } }
|
2007-09-02 10:09:01 +02:00
|
|
|
|
|
2007-09-09 17:10:21 +02:00
|
|
|
|
public void CreateContext() { }
|
|
|
|
|
public void CreateContext(bool direct) { }
|
|
|
|
|
public void CreateContext(bool direct, IGLContext source) { }
|
2007-09-02 10:09:01 +02:00
|
|
|
|
|
2007-09-09 17:10:21 +02:00
|
|
|
|
public void SwapBuffers() { }
|
|
|
|
|
public void MakeCurrent() { }
|
2007-12-09 19:15:51 +01:00
|
|
|
|
public bool IsCurrent { get { return true; } }
|
|
|
|
|
public IntPtr GetCurrentContext() { return IntPtr.Zero; }
|
|
|
|
|
|
|
|
|
|
public event DestroyEvent<IGLContext> Destroy;
|
2008-01-20 20:29:42 +01:00
|
|
|
|
void OnDestroy() { if (Destroy != null) Destroy(this, EventArgs.Empty); }
|
2007-12-09 19:15:51 +01:00
|
|
|
|
|
|
|
|
|
public void RegisterForDisposal(IDisposable resource)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException("Use the general GLContext class instead.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisposeResources()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException("Use the general GLContext class instead.");
|
|
|
|
|
}
|
2007-09-02 10:09:01 +02:00
|
|
|
|
|
2007-09-09 17:10:21 +02:00
|
|
|
|
public IntPtr GetAddress(string function) { return IntPtr.Zero; }
|
|
|
|
|
public IEnumerable<DisplayMode> GetDisplayModes() { return null; }
|
2007-09-02 10:09:01 +02:00
|
|
|
|
|
2007-10-15 13:16:20 +02:00
|
|
|
|
public bool VSync { get { return vsync; } set { vsync = value; } }
|
2007-09-29 17:24:55 +02:00
|
|
|
|
|
2007-09-02 10:09:01 +02:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region --- IDisposable Members ---
|
|
|
|
|
|
2007-09-09 17:10:21 +02:00
|
|
|
|
public void Dispose() { }
|
2007-09-02 10:09:01 +02:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|