I am trying to create an application that will need to use double buffering (for purpose of Vsync). I am using SDL.NET. From what I understood, in order to have double buffering, I have to SetVideoMode with OpenGl = true.
Here's the code:
Video.Initialize();
Video.GLSetAttribute(OpenGLAttr.DoubleBuffer, 1);
Video.GLSetAttribute(OpenGLAttr.SwapControl, 1);
Video.GLSetAttribute(OpenGLAttr.RedSize, 8);
Video.GLSetAttribute(OpenGLAttr.GreenSize, 8);
Video.GLSetAttribute(OpenGLAttr.BlueSize, 8);
Video.GLSetAttribute(OpenGLAttr.DepthSize, 16);
Video.SetVideoMode(VideoInfo.ScreenWidth, VideoInfo.ScreenHeight, false, true, true, true);
If 4th parameter (bool opengl) is false, it works - a new fullscreen window is created and displayed (but I assume, the OpenGLAttr's set above are meaningless in this case).
If 4th parameter is true, nothing happens - a new window gets created (at least, it appears in the list of open windows) but I cannot alt+tab into it.
What am I doing wrong?