/// Different hardware supports different flags, major and minor versions. Invalid parameters will be silently ignored.
/// </remarks>
public GraphicsContext(GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags)
+ : this(mode, window, FindSharedContext(), major, minor, flags)
+ {
+ }
+
+ /// <summary>
+ /// Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window.
+ /// </summary>
+ /// <param name="mode">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
+ /// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
+ /// <param name="shareContext">The GraphicsContext to share resources with, or null for explicit non-sharing.</param>
+ /// <param name="major">The major version of the new GraphicsContext.</param>
+ /// <param name="minor">The minor version of the new GraphicsContext.</param>
+ /// <param name="flags">The GraphicsContextFlags for the GraphicsContext.</param>
+ /// <remarks>
+ /// Different hardware supports different flags, major and minor versions. Invalid parameters will be silently ignored.
+ /// </remarks>
+ public GraphicsContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, int major, int minor, GraphicsContextFlags flags)
{
lock (SyncRoot)
{
Debug.Print("GraphicsContextFlags: {0}", flags);
Debug.Print("Requested version: {0}.{1}", major, minor);
- IGraphicsContext shareContext = FindSharedContext();
-
// Todo: Add a DummyFactory implementing IPlatformFactory.
if (designMode)
{