From c2d92f5acabda3f05b876bae45d1be2f6b215847 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 4 Nov 2009 17:18:32 +0000 Subject: [PATCH] Added simpler constructor overload for external GraphicsContexts. --- Source/OpenTK/Graphics/GraphicsContext.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/OpenTK/Graphics/GraphicsContext.cs b/Source/OpenTK/Graphics/GraphicsContext.cs index 6737d38f..f464fb89 100644 --- a/Source/OpenTK/Graphics/GraphicsContext.cs +++ b/Source/OpenTK/Graphics/GraphicsContext.cs @@ -122,6 +122,16 @@ namespace OpenTK.Graphics } } + /// + /// Constructs a new GraphicsContext from a pre-existing context created outside of OpenTK. + /// + /// The handle of the existing context. This must be a valid, unique handle that is not known to OpenTK. + /// The window this context is bound to. This must be a valid window obtained through Utilities.CreateWindowInfo. + /// Occurs if handle is identical to a context already registered with OpenTK. + public GraphicsContext(ContextHandle handle, IWindowInfo window) + : this(handle, window, null, 1, 0, GraphicsContextFlags.Default) + { } + /// /// Constructs a new GraphicsContext from a pre-existing context created outside of OpenTK. ///