/// <summary>
/// Swaps the front and back buffers, presenting the rendered scene to the screen.
+ /// This method will have no effect on a single-buffered <c>GraphicsMode</c>.
/// </summary>
public void SwapBuffers()
{
#region public void MakeCurrent()
/// <summary>
- /// Makes the underlying this GLControl current in the calling thread.
- /// All OpenGL commands issued are hereafter interpreted by this GLControl.
+ /// <para>
+ /// Makes <see cref="GLControl.Context"/> current in the calling thread.
+ /// All OpenGL commands issued are hereafter interpreted by this context.
+ /// </para>
+ /// <para>
+ /// When using multiple <c>GLControl</c>s, calling <c>MakeCurrent</c> on
+ /// one control will make all other controls non-current in the calling thread.
+ /// </para>
+ /// <seealso cref="Context"/>
+ /// <para>
+ /// A <c>GLControl</c> can only be current in one thread at a time.
+ /// To make a control non-current, call <c>GLControl.Context.MakeCurrent(null)</c>.
+ /// </para>
/// </summary>
public void MakeCurrent()
{
#region public IGraphicsContext Context
/// <summary>
- /// Gets an interface to the underlying GraphicsContext used by this GLControl.
+ /// Gets the <c>IGraphicsContext</c> instance that is associated with the <c>GLControl</c>.
+ /// The associated <c>IGraphicsContext</c> is updated whenever the <c>GLControl</c>
+ /// handle is created or recreated.
+ /// When using multiple <c>GLControl</c>s, ensure that <c>Context</c>
+ /// is current before performing any OpenGL operations.
+ /// <seealso cref="MakeCurrent"/>
/// </summary>
[Browsable(false)]
public IGraphicsContext Context
#region public bool VSync
/// <summary>
- /// Gets or sets a value indicating whether vsync is active for this GLControl.
+ /// Gets or sets a value indicating whether vsync is active for this <c>GLControl</c>.
+ /// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
+ /// is current before accessing this property.
+ /// <seealso cref="Context"/>
+ /// <seealso cref="MakeCurrent"/>
/// </summary>
[Description("Indicates whether GLControl updates are synced to the monitor's refresh rate.")]
public bool VSync
#region public GraphicsMode GraphicsMode
/// <summary>
- /// Gets the GraphicsMode of the GraphicsContext attached to this GLControl.
+ /// Gets the <c>GraphicsMode</c> of the <c>IGraphicsContext</c> associated with
+ /// this <c>GLControl</c>. If you wish to change <c>GraphicsMode</c>, you must
+ /// destroy and recreate the <c>GLControl</c>.
/// </summary>
- /// <remarks>
- /// To change the GraphicsMode, you must destroy and recreate the GLControl.
- /// </remarks>
public GraphicsMode GraphicsMode
{
get
#region public Bitmap GrabScreenshot()
- /// <summary>Grabs a screenshot of the frontbuffer contents.</summary>
+ /// <summary>
+ /// Grabs a screenshot of the frontbuffer contents.
+ /// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
+ /// is current before accessing this property.
+ /// <seealso cref="Context"/>
+ /// <seealso cref="MakeCurrent"/>
+ /// </summary>
/// <returns>A System.Drawing.Bitmap, containing the contents of the frontbuffer.</returns>
/// <exception cref="OpenTK.Graphics.GraphicsContextException">
/// Occurs when no OpenTK.Graphics.GraphicsContext is current in the calling thread.