mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 23:26:55 +00:00
Unique handles for different contexts (makes multiple contexts work under Visual Studio designer).
This commit is contained in:
parent
f978762c04
commit
653f9a812f
|
@ -1,6 +1,8 @@
|
||||||
#region --- License ---
|
#region --- License ---
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Licensed under the MIT/X11 license.
|
||||||
* See license.txt for license info
|
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||||
|
* This notice may not be removed from any source distribution.
|
||||||
|
* See license.txt for licensing detailed licensing details.
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -19,23 +21,28 @@ namespace OpenTK.Platform
|
||||||
{
|
{
|
||||||
GraphicsMode format;
|
GraphicsMode format;
|
||||||
bool vsync;
|
bool vsync;
|
||||||
static int dummy_context_count = 0;
|
ContextHandle handle;
|
||||||
IntPtr context;
|
static int handle_count;
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
public DummyGLContext(GraphicsMode format) { this.format = format; context = new IntPtr(dummy_context_count++); }
|
public DummyGLContext(GraphicsMode format) { this.format = format; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region --- IGraphicsContext Members ---
|
#region --- IGraphicsContext Members ---
|
||||||
|
|
||||||
public IntPtr Context { get { return IntPtr.Zero; } }
|
public IntPtr Context { get { return (IntPtr)handle_count; } }
|
||||||
public GraphicsMode GraphicsMode { get { return format; } }
|
public GraphicsMode GraphicsMode { get { return format; } }
|
||||||
|
|
||||||
//public void CreateContext() { }
|
public void CreateContext(bool direct, IGraphicsContext source)
|
||||||
//public void CreateContext(bool direct) { }
|
{
|
||||||
public void CreateContext(bool direct, IGraphicsContext source) { }
|
if (handle == null)
|
||||||
|
{
|
||||||
|
++handle_count;
|
||||||
|
handle = new ContextHandle((IntPtr)handle_count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SwapBuffers() { }
|
public void SwapBuffers() { }
|
||||||
public void MakeCurrent(IWindowInfo info) { }
|
public void MakeCurrent(IWindowInfo info) { }
|
||||||
|
@ -76,7 +83,7 @@ namespace OpenTK.Platform
|
||||||
|
|
||||||
ContextHandle IGraphicsContextInternal.Context
|
ContextHandle IGraphicsContextInternal.Context
|
||||||
{
|
{
|
||||||
get { return context; }
|
get { return handle; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue