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 a905b3ce24
commit d9fc224f72

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
}