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.
This commit is contained in:
Stefanos A. 2013-12-22 10:35:05 +01:00
parent a2744719d5
commit 0a46e20029

View file

@ -105,6 +105,9 @@ namespace OpenTK.Platform.Windows
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)
{
attributes.Add((int)WGL_ARB_pixel_format.RedBitsArb);
@ -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);