<refentry id="gtkglext-gdkglquery">
<refmeta>
<refentrytitle>Query</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTKGLEXT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Query</refname><refpurpose>Functions to query OpenGL support information</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;gdk/gdkgl.h&gt;


<link linkend="void">void</link>        (<link linkend="GdkGLProc">*GdkGLProc</link>)                    (void);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-gl-query-extension">gdk_gl_query_extension</link>          (void);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-gl-query-extension-for-display">gdk_gl_query_extension_for_display</link>
                                            (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-gl-query-version">gdk_gl_query_version</link>            (<link linkend="int">int</link> *major,
                                             <link linkend="int">int</link> *minor);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-gl-query-version-for-display">gdk_gl_query_version_for_display</link>
                                            (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                             <link linkend="int">int</link> *major,
                                             <link linkend="int">int</link> *minor);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-gl-query-gl-extension">gdk_gl_query_gl_extension</link>       (const <link linkend="char">char</link> *extension);
<link linkend="GdkGLProc">GdkGLProc</link>   <link linkend="gdk-gl-get-proc-address">gdk_gl_get_proc_address</link>         (const <link linkend="char">char</link> *proc_name);
</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GdkGLProc"/>GdkGLProc ()</title>
<indexterm><primary>GdkGLProc</primary></indexterm><programlisting><link linkend="void">void</link>        (*GdkGLProc)                    (void);</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gdk-gl-query-extension"/>gdk_gl_query_extension ()</title>
<indexterm><primary>gdk_gl_query_extension</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gdk_gl_query_extension          (void);</programlisting>
<para>
Indicates whether the window system supports the OpenGL extension
(GLX, WGL, etc.).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if OpenGL is supported, FALSE otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gdk-gl-query-extension-for-display"/>gdk_gl_query_extension_for_display ()</title>
<indexterm><primary>gdk_gl_query_extension_for_display</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gdk_gl_query_extension_for_display
                                            (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Indicates whether the window system supports the OpenGL extension
(GLX, WGL, etc.).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> where the query is sent to.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if OpenGL is supported, FALSE otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gdk-gl-query-version"/>gdk_gl_query_version ()</title>
<indexterm><primary>gdk_gl_query_version</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gdk_gl_query_version            (<link linkend="int">int</link> *major,
                                             <link linkend="int">int</link> *minor);</programlisting>
<para>
Returns the version numbers of the OpenGL extension to the window system.
</para>
<para>
In the X Window System, it returns the GLX version.
</para>
<para>
In the Microsoft Windows, it returns the Windows version.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>major</parameter>&nbsp;:</term>
<listitem><simpara> returns the major version number of the OpenGL extension.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>minor</parameter>&nbsp;:</term>
<listitem><simpara> returns the minor version number of the OpenGL extension.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> FALSE if it fails, TRUE otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gdk-gl-query-version-for-display"/>gdk_gl_query_version_for_display ()</title>
<indexterm><primary>gdk_gl_query_version_for_display</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gdk_gl_query_version_for_display
                                            (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                             <link linkend="int">int</link> *major,
                                             <link linkend="int">int</link> *minor);</programlisting>
<para>
Returns the version numbers of the OpenGL extension to the window system.
</para>
<para>
In the X Window System, it returns the GLX version.
</para>
<para>
In the Microsoft Windows, it returns the Windows version.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> where the query is sent to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>major</parameter>&nbsp;:</term>
<listitem><simpara> returns the major version number of the OpenGL extension.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>minor</parameter>&nbsp;:</term>
<listitem><simpara> returns the minor version number of the OpenGL extension.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> FALSE if it fails, TRUE otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gdk-gl-query-gl-extension"/>gdk_gl_query_gl_extension ()</title>
<indexterm><primary>gdk_gl_query_gl_extension</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gdk_gl_query_gl_extension       (const <link linkend="char">char</link> *extension);</programlisting>
<para>
Determines whether a given OpenGL extension is supported.
</para>
<para>
There must be a valid current rendering context to call
<link linkend="gdk-gl-query-gl-extension"><function>gdk_gl_query_gl_extension()</function></link>.
</para>
<para>
<link linkend="gdk-gl-query-gl-extension"><function>gdk_gl_query_gl_extension()</function></link> returns information about OpenGL extensions
only. This means that window system dependent extensions (for example,
GLX extensions) are not reported by <link linkend="gdk-gl-query-gl-extension"><function>gdk_gl_query_gl_extension()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>extension</parameter>&nbsp;:</term>
<listitem><simpara> name of OpenGL extension.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the OpenGL extension is supported, FALSE if not 
              supported.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gdk-gl-get-proc-address"/>gdk_gl_get_proc_address ()</title>
<indexterm><primary>gdk_gl_get_proc_address</primary></indexterm><programlisting><link linkend="GdkGLProc">GdkGLProc</link>   gdk_gl_get_proc_address         (const <link linkend="char">char</link> *proc_name);</programlisting>
<para>
Returns the address of the OpenGL, GLU, or GLX function.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>proc_name</parameter>&nbsp;:</term>
<listitem><simpara> function name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the address of the function named by <parameter>proc_name</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
