[X11] Fixed SGI_swap_control query

GLX can return valid function pointer to unsupported functions.
We need to check for extension support in addition to the
function pointer.

Fixes crash on OpenSUSE 13.1 in VirtualBox.
This commit is contained in:
thefiddler 2014-04-28 01:29:34 +02:00
parent 168713aecf
commit 0f920fb205

View file

@ -380,7 +380,9 @@ namespace OpenTK.Platform.X11
public override void LoadAll()
{
vsync_supported = Glx.SupportsFunction("glXSwapIntervalSGI");
vsync_supported =
SupportsExtension(display, currentWindow, "SupportsExtension") &&
Glx.SupportsFunction("glXSwapIntervalSGI");
Debug.Print("Context supports vsync: {0}.", vsync_supported);
base.LoadAll();