diff --git a/Source/OpenTK/GLContext.cs b/Source/OpenTK/GLContext.cs index 04dc4efc..f2e84a19 100644 --- a/Source/OpenTK/GLContext.cs +++ b/Source/OpenTK/GLContext.cs @@ -15,9 +15,9 @@ namespace OpenTK /// /// Represents and provides methods to manipulate an OpenGL render context. /// - public sealed class GLContext : IGLContext, IGLContextInternal, IGLContextCreationHack + public sealed class GLContext : IGraphicsContext, IGLContextInternal, IGLContextCreationHack { - IGLContext implementation; // The actual render context implementation for the underlying platform. + IGraphicsContext implementation; // The actual render context implementation for the underlying platform. List dispose_queue = new List(); bool disposed; @@ -77,14 +77,14 @@ namespace OpenTK #endregion - #region void ContextDestroyed(IGLContext context, EventArgs e) + #region void ContextDestroyed(IGraphicsContext context, EventArgs e) /// /// Handles the Destroy event. /// - /// The OpenTK.Platform.IGLContext that was destroyed. + /// The OpenTK.Platform.IGraphicsContext that was destroyed. /// Not used. - void ContextDestroyed(IGLContext context, EventArgs e) + void ContextDestroyed(IGraphicsContext context, EventArgs e) { this.Destroy -= ContextDestroyed; available_contexts.Remove(((IGLContextInternal)this).Context); @@ -94,7 +94,7 @@ namespace OpenTK #region --- Public Members --- - #region public static IGLContext CurrentContext + #region public static IGraphicsContext CurrentContext internal delegate ContextHandle GetCurrentContextDelegate(); internal static GetCurrentContextDelegate GetCurrentContext; @@ -142,7 +142,7 @@ namespace OpenTK #endregion - #region --- IGLContext Members --- + #region --- IGraphicsContext Members --- /// /// Creates an OpenGL context. @@ -174,12 +174,12 @@ namespace OpenTK /// /// Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the - /// specified IGLContext. + /// specified IGraphicsContext. /// /// Set to true for direct rendering or false otherwise. - /// The source IGLContext to share state from.. + /// The source IGraphicsContext to share state from.. /// - public void CreateContext(bool direct, IGLContext source) + public void CreateContext(bool direct, IGraphicsContext source) { implementation.CreateContext(direct, source); this.Destroy += ContextDestroyed; @@ -217,7 +217,7 @@ namespace OpenTK /// /// Raised when a Context is destroyed. /// - public event DestroyEvent Destroy + public event DestroyEvent Destroy { add { implementation.Destroy += value; } remove { implementation.Destroy -= value; } diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index 73fb1d39..fe53dcca 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -21,7 +21,7 @@ namespace OpenTK /// public partial class GLControl : UserControl { - IGLContext context; + IGraphicsContext context; IPlatformIdle idle; DisplayMode display_mode; @@ -86,13 +86,13 @@ namespace OpenTK #endregion - #region public IGLContext Context + #region public IGraphicsContext Context /// /// Gets an interface to the underlying GLContext used by this GLControl. /// [Browsable(false)] - public IGLContext Context + public IGraphicsContext Context { get { return context; } private set { context = value; } diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 6ba17c48..1e1f90ad 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -74,7 +74,7 @@ namespace OpenTK //InputDriver input_driver; - IGLContext glContext; + IGraphicsContext glContext; #endregion @@ -236,13 +236,13 @@ namespace OpenTK #endregion - #region public IGLContext Context + #region public IGraphicsContext Context /// /// Returns the opengl IGLontext associated with the current GameWindow. /// Forces window creation. /// - public IGLContext Context + public IGraphicsContext Context { get { return glContext; } } diff --git a/Source/OpenTK/Platform/DummyGLContext.cs b/Source/OpenTK/Platform/DummyGLContext.cs index d361c65b..c8a457c8 100644 --- a/Source/OpenTK/Platform/DummyGLContext.cs +++ b/Source/OpenTK/Platform/DummyGLContext.cs @@ -11,10 +11,10 @@ using System.Text; namespace OpenTK.Platform { /// - /// An empty IGLContext implementation to be used inside the Visual Studio designer. + /// An empty IGraphicsContext implementation to be used inside the Visual Studio designer. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - internal sealed class DummyGLContext : IGLContext + internal sealed class DummyGLContext : IGraphicsContext { WindowInfo info = new WindowInfo(); DisplayMode mode; @@ -26,7 +26,7 @@ namespace OpenTK.Platform #endregion - #region --- IGLContext Members --- + #region --- IGraphicsContext Members --- public IntPtr Context { get { return IntPtr.Zero; } } public IWindowInfo Info { get { return info; } } @@ -34,14 +34,14 @@ namespace OpenTK.Platform public void CreateContext() { } public void CreateContext(bool direct) { } - public void CreateContext(bool direct, IGLContext source) { } + public void CreateContext(bool direct, IGraphicsContext source) { } public void SwapBuffers() { } public void MakeCurrent() { } public bool IsCurrent { get { return true; } set { } } public IntPtr GetCurrentContext() { return IntPtr.Zero; } - public event DestroyEvent Destroy; + public event DestroyEvent Destroy; void OnDestroy() { if (Destroy != null) Destroy(this, EventArgs.Empty); } public void RegisterForDisposal(IDisposable resource) diff --git a/Source/OpenTK/Platform/IGLContext.cs b/Source/OpenTK/Platform/IGLContext.cs index e7ca3398..07febb36 100644 --- a/Source/OpenTK/Platform/IGLContext.cs +++ b/Source/OpenTK/Platform/IGLContext.cs @@ -13,16 +13,16 @@ namespace OpenTK.Platform /// /// Provides methods for creating and interacting with an OpenGL context. /// - public interface IGLContext : IDisposable + public interface IGraphicsContext : IDisposable { /// /// Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the - /// specified IGLContext. + /// specified IGraphicsContext. /// /// Set to true for direct rendering or false otherwise. - /// The source IGLContext to share state from.. + /// The source IGraphicsContext to share state from.. /// - void CreateContext(bool direct, IGLContext source); + void CreateContext(bool direct, IGraphicsContext source); /// Swaps buffers, presenting the rendered scene to the user. void SwapBuffers(); @@ -42,7 +42,7 @@ namespace OpenTK.Platform /// /// Raised when a Context is destroyed. /// - event DestroyEvent Destroy; + event DestroyEvent Destroy; /// /// Gets or sets a value indicating whether VSyncing is enabled. diff --git a/Source/OpenTK/Platform/INativeGLWindow.cs b/Source/OpenTK/Platform/INativeGLWindow.cs index 9d8e5a73..d351457d 100644 --- a/Source/OpenTK/Platform/INativeGLWindow.cs +++ b/Source/OpenTK/Platform/INativeGLWindow.cs @@ -20,8 +20,8 @@ namespace OpenTK.Platform /// internal interface INativeGLWindow : IResizable, IDisposable { - //void CreateWindow(int width, int height, DisplayMode mode, out IGLContext context); - void CreateWindow(int width, int height, GraphicsFormat mode, out IGLContext context); + //void CreateWindow(int width, int height, DisplayMode mode, out IGraphicsContext context); + void CreateWindow(int width, int height, GraphicsFormat mode, out IGraphicsContext context); void DestroyWindow(); void ProcessEvents(); void PointToClient(ref System.Drawing.Point p); @@ -33,7 +33,7 @@ namespace OpenTK.Platform string Title { get; set; } bool Visible { get; set; } bool IsIdle { get; } - //IGLContext Context { get; } + //IGraphicsContext Context { get; } IInputDriver InputDriver { get; } bool Fullscreen { get; set; } diff --git a/Source/OpenTK/Platform/Windows/WinGLContext.cs b/Source/OpenTK/Platform/Windows/WinGLContext.cs index df508c8f..b8176d04 100644 --- a/Source/OpenTK/Platform/Windows/WinGLContext.cs +++ b/Source/OpenTK/Platform/Windows/WinGLContext.cs @@ -23,7 +23,7 @@ namespace OpenTK.Platform.Windows /// Provides methods to create and control an opengl context on the Windows platform. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - internal sealed class WinGLContext : IGLContext, IGLContextInternal, IGLContextCreationHack + internal sealed class WinGLContext : IGraphicsContext, IGLContextInternal, IGLContextCreationHack { private IntPtr deviceContext; private ContextHandle renderContext; @@ -51,7 +51,7 @@ namespace OpenTK.Platform.Windows #endregion - #region --- IGLContext Members --- + #region --- IGraphicsContext Members --- #region public void CreateContext() @@ -71,9 +71,9 @@ namespace OpenTK.Platform.Windows #endregion - #region public void CreateContext(bool direct, IGLContext source) + #region public void CreateContext(bool direct, IGraphicsContext source) - public void CreateContext(bool direct, IGLContext source) + public void CreateContext(bool direct, IGraphicsContext source) { Debug.WriteLine(String.Format("OpenGL context is bound to handle: {0}", this.windowInfo.Handle)); @@ -161,7 +161,7 @@ namespace OpenTK.Platform.Windows #endregion - public event DestroyEvent Destroy; + public event DestroyEvent Destroy; #endregion diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index ef92055a..2d1029e6 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -307,9 +307,9 @@ namespace OpenTK.Platform.Windows #endregion - #region public void CreateWindow(int width, int height, GraphicsFormat format, out IGLContext context) + #region public void CreateWindow(int width, int height, GraphicsFormat format, out IGraphicsContext context) - public void CreateWindow(int width, int height, GraphicsFormat format, out IGLContext context) + public void CreateWindow(int width, int height, GraphicsFormat format, out IGraphicsContext context) { Debug.Print("Creating native window."); Debug.Indent(); diff --git a/Source/OpenTK/Platform/X11/X11GLContext.cs b/Source/OpenTK/Platform/X11/X11GLContext.cs index 3300bac6..8e15f564 100644 --- a/Source/OpenTK/Platform/X11/X11GLContext.cs +++ b/Source/OpenTK/Platform/X11/X11GLContext.cs @@ -18,7 +18,7 @@ namespace OpenTK.Platform.X11 /// Provides methods to create and control an opengl context on the X11 platform. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - internal sealed class X11GLContext : IGLContext, IGLContextInternal, IGLContextCreationHack + internal sealed class X11GLContext : IGraphicsContext, IGLContextInternal, IGLContextCreationHack { IntPtr context; DisplayMode mode; @@ -118,7 +118,7 @@ namespace OpenTK.Platform.X11 #endregion - #region --- IGLContext Members --- + #region --- IGraphicsContext Members --- #region public DisplayMode Mode @@ -154,9 +154,9 @@ namespace OpenTK.Platform.X11 #endregion - #region public void CreateContext(bool direct, IGLContext shareContext) + #region public void CreateContext(bool direct, IGraphicsContext shareContext) - public void CreateContext(bool direct, IGLContext shareContext) + public void CreateContext(bool direct, IGraphicsContext shareContext) { try { @@ -288,7 +288,7 @@ namespace OpenTK.Platform.X11 #endregion - public event DestroyEvent Destroy; + public event DestroyEvent Destroy; #region public IntPtr GetAddress(string function) diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index a4d95352..ab6ec552 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -392,9 +392,9 @@ namespace OpenTK.Platform.X11 #endregion - #region public void CreateWindow(int width, int height, GraphicsFormat format, out IGLContext glContext) + #region public void CreateWindow(int width, int height, GraphicsFormat format, out IGraphicsContext glContext) - public void CreateWindow(int width, int height, GraphicsFormat format, out IGLContext glContext) + public void CreateWindow(int width, int height, GraphicsFormat format, out IGraphicsContext glContext) { if (exists) throw new ApplicationException("Render window already exists!"); @@ -478,7 +478,7 @@ namespace OpenTK.Platform.X11 #endregion - #region public void CreateWindow(int width, int height, DisplayMode mode, out IGLContext glContext) + #region public void CreateWindow(int width, int height, DisplayMode mode, out IGraphicsContext glContext) /// /// Opens a new render window with the given DisplayMode. @@ -491,7 +491,7 @@ namespace OpenTK.Platform.X11 /// Colormap creation is currently disabled. /// /// - public void CreateWindow(int width, int height, DisplayMode mode, out IGLContext glContext) + public void CreateWindow(int width, int height, DisplayMode mode, out IGraphicsContext glContext) { this.CreateWindow(width, height, new GraphicsFormat(), out glContext); }