Added IsSupported property, which checks for the existence of EGL libraries.

This commit is contained in:
the_fiddler 2009-08-13 11:40:16 +00:00
parent 396b9820a3
commit 0f382fd86c

View file

@ -403,6 +403,17 @@ namespace OpenTK.Platform.Egl
[return: MarshalAsAttribute(UnmanagedType.I1)]
public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
// Returns true if Egl drivers exist on the system.
public static bool IsSupported
{
get
{
try { GetCurrentContext(); }
catch (Exception) { return false; }
return true;
}
}
}
#pragma warning restore 0169
}