mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 21:56:53 +00:00
Fixed GLContext creation on Windows.
This commit is contained in:
parent
ce26403956
commit
876b5139ef
|
@ -57,6 +57,9 @@ namespace OpenTK
|
|||
default:
|
||||
throw new PlatformNotSupportedException("Your platform is not supported currently. Please, refer to http://www.opentk.com for more information.");
|
||||
}
|
||||
|
||||
(this as IGLContextCreationHack).SetWindowHandle(window.Handle);
|
||||
(this as IGLContextCreationHack).SelectDisplayMode(mode, window);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -203,6 +203,8 @@ namespace OpenTK
|
|||
// specific depth for the DisplayMode - we let the driver select one instead.
|
||||
display_mode.Color = new ColorMode(0);
|
||||
context = new GLContext(display_mode, info);
|
||||
(context as IGLContextCreationHack).SetWindowHandle(info.Handle);
|
||||
(context as IGLContextCreationHack).SelectDisplayMode(display_mode, info);
|
||||
context.CreateContext(true, null);
|
||||
idle = new PlatformIdle(info);
|
||||
}
|
||||
|
|
|
@ -125,8 +125,6 @@ namespace OpenTK
|
|||
"Your platform is not supported currently. Please, refer to http://opentk.sourceforge.net for more information.");
|
||||
}
|
||||
|
||||
glWindow.Destroy += new DestroyEvent(glWindow_Destroy);
|
||||
|
||||
CreateWindow(mode, title);
|
||||
|
||||
//this.vsync = VSyncMode.Adaptive;
|
||||
|
@ -381,8 +379,6 @@ namespace OpenTK
|
|||
{
|
||||
glWindow.CreateWindow(mode, glContext);
|
||||
glContext = new GLContext(mode, glWindow.WindowInfo);
|
||||
(glContext as IGLContextCreationHack).SetWindowHandle(glWindow.WindowInfo.Handle);
|
||||
(glContext as IGLContextCreationHack).SelectDisplayMode(mode, glWindow.WindowInfo);
|
||||
glContext.CreateContext();
|
||||
this.Title = title;
|
||||
}
|
||||
|
@ -1221,7 +1217,7 @@ namespace OpenTK
|
|||
}
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#if false // TODO: 0.3.15 (Linux support missing)
|
||||
#region PointToClient
|
||||
|
||||
/// <summary>
|
||||
|
@ -1251,7 +1247,7 @@ namespace OpenTK
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endif
|
||||
#region --- IDisposable Members ---
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue