mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 13:45:36 +00:00
Ensure Wgl core entry points are loaded prior to first use, even without a Wgl context.
Do not query actual GraphicsMode.Default in DummyGLContext constructor. Doing so creates a temporary context, which should not be done when creating a dummy context. Fixed issue [#993]: "Possible bug in GraphicsContext.CreateDummyContext()".
This commit is contained in:
parent
93b950ec22
commit
81b06b8a08
|
@ -19,7 +19,8 @@ namespace OpenTK.Platform.Dummy
|
|||
/// </summary>
|
||||
internal sealed class DummyGLContext : IGraphicsContext, IGraphicsContextInternal
|
||||
{
|
||||
GraphicsMode format = GraphicsMode.Default;
|
||||
// This mode is not real. To receive a real mode we'd have to create a temporary context, which is not desirable!
|
||||
GraphicsMode format = new GraphicsMode(new IntPtr(2), 32, 16, 0, 0, 0, 2, false);
|
||||
bool vsync;
|
||||
ContextHandle handle;
|
||||
static int handle_count;
|
||||
|
|
|
@ -24,7 +24,9 @@ namespace OpenTK.Platform.Windows
|
|||
delegatesClass = wglClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
importsClass = wglClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
//LoadAll();
|
||||
// Ensure core entry points are ready prior to accessing any method.
|
||||
// Resolves bug [#993]: "Possible bug in GraphicsContext.CreateDummyContext()"
|
||||
LoadAll();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue