mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-13 11:25:28 +00:00
Moved GraphicsContext creation to the HandleCreated event.
This commit is contained in:
parent
28ed42406a
commit
1c69f7e07f
|
@ -15,14 +15,16 @@ namespace OpenTK.Platform
|
||||||
/// An empty IGraphicsContext implementation to be used inside the Visual Studio designer.
|
/// An empty IGraphicsContext implementation to be used inside the Visual Studio designer.
|
||||||
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class DummyGLContext : IGraphicsContext
|
internal sealed class DummyGLContext : IGraphicsContext, IGraphicsContextInternal
|
||||||
{
|
{
|
||||||
GraphicsMode format;
|
GraphicsMode format;
|
||||||
bool vsync;
|
bool vsync;
|
||||||
|
static int dummy_context_count = 0;
|
||||||
|
IntPtr context;
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
public DummyGLContext(GraphicsMode format) { this.format = format; }
|
public DummyGLContext(GraphicsMode format) { this.format = format; context = new IntPtr(dummy_context_count++); }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -65,5 +67,18 @@ namespace OpenTK.Platform
|
||||||
public void Dispose() { }
|
public void Dispose() { }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IGraphicsContextInternal Members
|
||||||
|
|
||||||
|
public void LoadAll()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ContextHandle IGraphicsContextInternal.Context
|
||||||
|
{
|
||||||
|
get { return context; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue