#region --- License --- /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos * See license.txt for license info */ #endregion using System; using System.Collections.Generic; using System.Text; namespace OpenTK.Platform { /// /// Provides methods for creating and interacting with an OpenGL context. /// 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. /// void CreateContext(); /// /// Creates an OpenGL context with a direct or indirect rendering mode. This parameter is ignored /// on Windows platforms (direct mode only). /// /// Set to true for direct rendering or false otherwise. /// /// /// Direct rendering is the default rendering mode for OpenTK, since it can provide higher performance /// in some circumastances. /// /// /// The 'direct' parameter is a hint, and will ignored if the specified mode is not supported (e.g. setting /// indirect rendering on Windows platforms). /// /// void CreateContext(bool direct); /// /// Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the /// specified IGLContext. /// /// Set to true for direct rendering or false otherwise. /// The source IGLContext to share state from.. /// void CreateContext(bool direct, IGLContext source); /// /// Swaps buffers on a context. This presents the rendered scene to the user. /// void SwapBuffers(); /// /// Makes this context the current rendering target. /// void MakeCurrent(); /// /// 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(); } }