Пример #1
0
            /// <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);
            }