mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 16:05:34 +00:00
Remove System.Windows.Forms.Control dependency in favor of OpenTK.NativeWindow.
This commit is contained in:
parent
542144ac7c
commit
4e86dd1381
|
@ -154,10 +154,11 @@ namespace OpenTK.Platform.Windows
|
|||
GraphicsMode SelectGraphicsModeARB(ColorDepth color, int depth, int stencil, int samples, ColorDepth accum,
|
||||
int buffers, bool stereo)
|
||||
{
|
||||
using (Control native_window = new Control())
|
||||
using (WinWindowInfo window = new WinWindowInfo(native_window.Handle, null))
|
||||
using (WinGLContext context = new WinGLContext(new GraphicsMode(new ColorFormat(), 0, 0, 0, new ColorFormat(), 2, false), window, null, 1, 0, GraphicsContextFlags.Default))
|
||||
using (INativeWindow native_window = new NativeWindow())
|
||||
using (IGraphicsContext context = new GraphicsContext(new GraphicsMode(new ColorFormat(), 0, 0, 0, new ColorFormat(), 2, false), native_window.WindowInfo, 1, 0, GraphicsContextFlags.Default))
|
||||
{
|
||||
WinWindowInfo window = (WinWindowInfo)native_window.WindowInfo;
|
||||
|
||||
Debug.Write("Selecting pixel format (ARB)... ");
|
||||
if (Wgl.Delegates.wglChoosePixelFormatARB == null || Wgl.Delegates.wglGetPixelFormatAttribivARB == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue