From 0a46e20029ee70d75d0008c1709fd52d3fcf56d5 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Sun, 22 Dec 2013 10:35:05 +0100 Subject: [PATCH] Added WGL_DRAW_TO_WINDOW_ARB flag Without this flag, OpenGL rendering does not work as expected. Additionally, all WGL_ARB_pixel_format attributes are expected to be specified in key-value pairs. Fixed double-buffering and stereoscoping rendering attributes. --- Source/OpenTK/Platform/Windows/WinGraphicsMode.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/OpenTK/Platform/Windows/WinGraphicsMode.cs b/Source/OpenTK/Platform/Windows/WinGraphicsMode.cs index a9544f71..9de28341 100644 --- a/Source/OpenTK/Platform/Windows/WinGraphicsMode.cs +++ b/Source/OpenTK/Platform/Windows/WinGraphicsMode.cs @@ -104,6 +104,9 @@ namespace OpenTK.Platform.Windows List attributes = new List(); attributes.Add((int)WGL_ARB_pixel_format.AccelerationArb); attributes.Add((int)WGL_ARB_pixel_format.FullAccelerationArb); + + attributes.Add((int)WGL_ARB_pixel_format.DrawToWindowArb); + attributes.Add(1); if (mode.ColorFormat.Red > 0) { @@ -176,11 +179,13 @@ namespace OpenTK.Platform.Windows if (mode.Buffers > 0) { attributes.Add((int)WGL_ARB_pixel_format.DoubleBufferArb); + attributes.Add(mode.Buffers > 1 ? 1 : 0); } if (mode.Stereo) { attributes.Add((int)WGL_ARB_pixel_format.StereoArb); + attributes.Add(1); } attributes.Add(0);