/// <summary> /// Query the GLX version supported by current implementation. /// </summary> private void QueryVersion() { using (Glx.XLock xLock = new Glx.XLock(Display)) { int[] majorArg = new int[1], minorArg = new int[1]; Glx.QueryVersion(Display, majorArg, minorArg); _GlxVersion = new KhronosVersion(majorArg[0], minorArg[0], KhronosVersion.ApiGlx); } }
/// <summary> /// Query the extensions supported by current platform. /// </summary> /// <param name="deviceContext"> /// A <see cref="XServerDeviceContext"/> that specifies the device context to query extensions for. /// </param> public void Query(XServerDeviceContext deviceContext) { if (deviceContext == null) { throw new ArgumentNullException("deviceContext"); } LogComment("Query GLX extensions."); string glxExtensions = null; int[] majorArg = new int[1], minorArg = new int[1]; using (Glx.XLock xLock = new Glx.XLock(deviceContext.Display)) { Glx.QueryVersion(deviceContext.Display, majorArg, minorArg); if ((majorArg[0] >= 1) && (minorArg[0] >= 1)) { glxExtensions = Glx.QueryExtensionsString(deviceContext.Display, 0); } } Query(new KhronosVersion(majorArg[0], minorArg[1], KhronosVersion.ApiGlx), glxExtensions ?? String.Empty); }