<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glGetString">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>glGetString</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glGetString</refname>
        <refpurpose>return a string describing the current GL connection</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>const GLubyte* <function>glGetString</function></funcdef>
                <paramdef>GLenum <parameter>name</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>name</parameter></term>
            <listitem>
                <para>
                    Specifies a symbolic constant, one of
                    <constant>GL_VENDOR</constant>, <constant>GL_RENDERER</constant>, <constant>GL_VERSION</constant>, <constant>GL_SHADING_LANGUAGE_VERSION</constant>, or <constant>GL_EXTENSIONS</constant>.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            <function>glGetString</function> returns a pointer to a static string
            describing some aspect of the current GL connection.
            <parameter>name</parameter> can be one of the following:
        </para>
        <variablelist>
            <varlistentry>
                <term><constant>GL_VENDOR</constant></term>
                <listitem>
                    <para>
                    </para>
                    <para>
                        Returns the company responsible for this GL implementation.
                        This name does not change from release to release.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_RENDERER</constant></term>
                <listitem>
                    <para>
                    </para>
                    <para>
                        Returns the name of the renderer.
                        This name is typically specific to a particular configuration of a hardware
                        platform.
                        It does not change from release to release.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_VERSION</constant></term>
                <listitem>
                    <para>
                    </para>
                    <para>
                        Returns a version or release number.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_SHADING_LANGUAGE_VERSION</constant></term>
                <listitem>
                    <para>
                    </para>
                    <para>
                        Returns a version or release number for the shading language.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_EXTENSIONS</constant></term>
                <listitem>
                    <para>
                    </para>
                    <para>
                        Returns a space-separated list of supported extensions to GL.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
        <para>
            Because the GL does not include queries for the performance
            characteristics of an implementation, some applications are written to
            recognize known platforms and modify their GL usage based on known
            performance characteristics of these platforms.
            Strings <constant>GL_VENDOR</constant> and <constant>GL_RENDERER</constant> together uniquely specify
            a platform. They do not change from release to release and should be used
            by platform-recognition algorithms.
        </para>
        <para>
            Some applications want to make use of features that
            are not part of the standard GL. These features
            may be implemented as extensions to the standard GL.
            The <constant>GL_EXTENSIONS</constant> string is a space-separated
            list of supported GL extensions.
            (Extension names never contain a space character.)
        </para>
        <para>
            The <constant>GL_VERSION</constant> and <constant>GL_SHADING_LANGUAGE_VERSION</constant> strings begin with a version number.
            The version number uses one
            of these forms:
        </para>
        <para>
            <emphasis>major_number.minor_number</emphasis>
            <emphasis>major_number.minor_number.release_number</emphasis>
        </para>
        <para>
            Vendor-specific information may follow the version
            number. Its format depends on the implementation, but
            a space always separates the version number and
            the vendor-specific information.
        </para>
        <para>
            All strings are null-terminated.
        </para>
    </refsect1>
    <refsect1 id="notes"><title>Notes</title>
        <para>
            If an error is generated, <function>glGetString</function> returns 0.
        </para>
        <para>
            The client and server may support different versions or extensions.
            <function>glGetString</function> always returns a compatible version number or list of extensions.
            The release number always describes the server.
        </para>
        <para>
            <constant>GL_SHADING_LANGUAGE_VERSION</constant> is available only if the GL version is 2.0 or greater.
        </para>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>name</parameter> is not an accepted value.
        </para>
        <para>
            <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetString</function>
            is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
            and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
        </para>
    </refsect1>
    <refsect1 id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"></trademark> 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
        </para>
    </refsect1>
</refentry>
