diff --git a/Source/OpenTK/Platform/IGLContext.cs b/Source/OpenTK/Platform/IGLContext.cs
index 85eb275a..ddebc655 100644
--- a/Source/OpenTK/Platform/IGLContext.cs
+++ b/Source/OpenTK/Platform/IGLContext.cs
@@ -15,21 +15,6 @@ namespace OpenTK.Platform
///
public interface IGLContext : IDisposable
{
- ///
- /// Gets a handle to the OpenGL rendering context.
- ///
- IntPtr Context { get; }
-
- ///
- /// Gets the IWindowInfo describing the window associated with this context.
- ///
- IWindowInfo Info { get; }
-
- ///
- /// Gets the DisplayMode of the context.
- ///
- DisplayMode Mode { get; }
-
///
/// Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the
/// specified IGLContext.
@@ -54,39 +39,52 @@ namespace OpenTK.Platform
///
bool IsCurrent { get; }
- ///
- /// Gets a System.IntPtr containing the handle to the OpenGL context which is current in the
- /// calling thread, or IntPtr.Zero if no OpenGL context is current.
- ///
- /// A System.IntPtr that holds the handle to the current OpenGL context.
- IntPtr GetCurrentContext();
-
///
/// Raised when a Context is destroyed.
///
event DestroyEvent Destroy;
- ///
- /// Gets the address of an OpenGL extension function.
- ///
- /// The name of the OpenGL function (e.g. "glGetString")
- ///
- /// A pointer to the specified function or IntPtr.Zero if the function isn't
- /// available in the current opengl context.
- ///
- ///
- IntPtr GetAddress(string function);
-
- ///
- /// Returns the display modes supported by the current opengl context.
- ///
- /// An IEnumerable containing all supported display modes.
- IEnumerable GetDisplayModes();
-
///
/// Gets or sets a value indicating whether VSyncing is enabled.
///
bool VSync { get; set; }
+ }
+
+ public delegate void DestroyEvent(T sender, EventArgs e);
+
+ // TODO: Remove in 0.3.15
+ internal interface IGLContextCreationHack
+ {
+ bool SelectDisplayMode(DisplayMode mode, IWindowInfo info);
+ void SetWindowHandle(IntPtr handle);
+ }
+
+ // Functions for internal use by OpenTK.
+ // TODO: RegisterForDisposal/DisposeResources for 0.3.15 (GC & OpenGL)
+ // TODO: Remove or move GetDisplayModes to another class.
+ internal interface IGLContextInternal
+ {
+ ///
+ /// Gets a handle to the OpenGL rendering context.
+ ///
+ ContextHandle Context { get; }
+
+ ///
+ /// Gets the IWindowInfo describing the window associated with this context.
+ ///
+ IWindowInfo Info { get; }
+
+ ///
+ /// Gets the DisplayMode of the context.
+ ///
+ DisplayMode Mode { get; }
+
+ ///
+ /// Gets a System.IntPtr containing the handle to the OpenGL context which is current in the
+ /// calling thread, or IntPtr.Zero if no OpenGL context is current.
+ ///
+ /// A System.IntPtr that holds the handle to the current OpenGL context.
+ ContextHandle GetCurrentContext();
///
/// Registers an OpenGL resource for disposal.
@@ -104,7 +102,22 @@ namespace OpenTK.Platform
/// Disposes all registered OpenGL resources.
///
void DisposeResources();
- }
- public delegate void DestroyEvent(T sender, EventArgs e);
+ ///
+ /// Returns the display modes supported by the current opengl context.
+ ///
+ /// An IEnumerable containing all supported display modes.
+ IEnumerable GetDisplayModes();
+
+ ///
+ /// Gets the address of an OpenGL extension function.
+ ///
+ /// The name of the OpenGL function (e.g. "glGetString")
+ ///
+ /// A pointer to the specified function or IntPtr.Zero if the function isn't
+ /// available in the current opengl context.
+ ///
+ ///
+ IntPtr GetAddress(string function);
+ }
}