mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 05:35:38 +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.
|
||||
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
||||
/// </summary>
|
||||
internal sealed class DummyGLContext : IGraphicsContext
|
||||
internal sealed class DummyGLContext : IGraphicsContext, IGraphicsContextInternal
|
||||
{
|
||||
GraphicsMode format;
|
||||
bool vsync;
|
||||
static int dummy_context_count = 0;
|
||||
IntPtr context;
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
public DummyGLContext(GraphicsMode format) { this.format = format; }
|
||||
public DummyGLContext(GraphicsMode format) { this.format = format; context = new IntPtr(dummy_context_count++); }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -65,5 +67,18 @@ namespace OpenTK.Platform
|
|||
public void Dispose() { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGraphicsContextInternal Members
|
||||
|
||||
public void LoadAll()
|
||||
{
|
||||
}
|
||||
|
||||
ContextHandle IGraphicsContextInternal.Context
|
||||
{
|
||||
get { return context; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue