mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-19 20:18: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,
|
GraphicsMode SelectGraphicsModeARB(ColorDepth color, int depth, int stencil, int samples, ColorDepth accum,
|
||||||
int buffers, bool stereo)
|
int buffers, bool stereo)
|
||||||
{
|
{
|
||||||
using (Control native_window = new Control())
|
using (INativeWindow native_window = new NativeWindow())
|
||||||
using (WinWindowInfo window = new WinWindowInfo(native_window.Handle, null))
|
using (IGraphicsContext context = new GraphicsContext(new GraphicsMode(new ColorFormat(), 0, 0, 0, new ColorFormat(), 2, false), native_window.WindowInfo, 1, 0, GraphicsContextFlags.Default))
|
||||||
using (WinGLContext context = new WinGLContext(new GraphicsMode(new ColorFormat(), 0, 0, 0, new ColorFormat(), 2, false), window, null, 1, 0, GraphicsContextFlags.Default))
|
|
||||||
{
|
{
|
||||||
|
WinWindowInfo window = (WinWindowInfo)native_window.WindowInfo;
|
||||||
|
|
||||||
Debug.Write("Selecting pixel format (ARB)... ");
|
Debug.Write("Selecting pixel format (ARB)... ");
|
||||||
if (Wgl.Delegates.wglChoosePixelFormatARB == null || Wgl.Delegates.wglGetPixelFormatAttribivARB == null)
|
if (Wgl.Delegates.wglChoosePixelFormatARB == null || Wgl.Delegates.wglGetPixelFormatAttribivARB == null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue