1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glGetString">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glGetString
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetString
</refname>
17 <refpurpose>return a string describing the current GL connection
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>const GLubyte*
<function>glGetString
</function></funcdef>
23 <paramdef>GLenum
<parameter>name
</parameter></paramdef>
27 <refsynopsisdiv><title>C Specification
</title>
30 <funcdef>const GLubyte*
<function>glGetStringi
</function></funcdef>
31 <paramdef>GLenum
<parameter>name
</parameter></paramdef>
32 <paramdef>GLuint
<parameter>index
</parameter></paramdef>
36 <refsect1 id=
"parameters"><title>Parameters
</title>
39 <term><parameter>name
</parameter></term>
42 Specifies a symbolic constant, one of
43 <constant>GL_VENDOR
</constant>,
<constant>GL_RENDERER
</constant>,
44 <constant>GL_VERSION
</constant>, or
<constant>GL_SHADING_LANGUAGE_VERSION
</constant>.
45 Additionally,
<function>glGetStringi
</function> accepts the
<constant>GL_EXTENSIONS
</constant> token.
50 <term><parameter>index
</parameter></term>
53 For
<function>glGetStringi
</function>, specifies the index of the string to return.
59 <refsect1 id=
"description"><title>Description
</title>
61 <function>glGetString
</function> returns a pointer to a static string
62 describing some aspect of the current GL connection.
63 <parameter>name
</parameter> can be one of the following:
67 <term><constant>GL_VENDOR
</constant></term>
72 Returns the company responsible for this GL implementation.
73 This name does not change from release to release.
78 <term><constant>GL_RENDERER
</constant></term>
83 Returns the name of the renderer.
84 This name is typically specific to a particular configuration of a hardware
86 It does not change from release to release.
91 <term><constant>GL_VERSION
</constant></term>
96 Returns a version or release number.
101 <term><constant>GL_SHADING_LANGUAGE_VERSION
</constant></term>
106 Returns a version or release number for the shading language.
112 <function>glGetStringi
</function> returns a pointer to a static string
113 indexed by
<parameter>index
</parameter>.
114 <parameter>name
</parameter> can be one of the following:
118 <term><constant>GL_EXTENSIONS
</constant></term>
123 For
<function>glGetStringi
</function> only, returns the extension string
124 supported by the implementation at
<parameter>index
</parameter>.
130 Strings
<constant>GL_VENDOR
</constant> and
<constant>GL_RENDERER
</constant> together uniquely specify
131 a platform. They do not change from release to release and should be used
132 by platform-recognition algorithms.
135 The
<constant>GL_VERSION
</constant> and
<constant>GL_SHADING_LANGUAGE_VERSION
</constant> strings begin with a version number.
136 The version number uses one
140 <emphasis>major_number.minor_number
</emphasis>
141 <emphasis>major_number.minor_number.release_number
</emphasis>
144 Vendor-specific information may follow the version
145 number. Its format depends on the implementation, but
146 a space always separates the version number and
147 the vendor-specific information.
150 All strings are null-terminated.
153 <refsect1 id=
"notes"><title>Notes
</title>
155 If an error is generated,
<function>glGetString
</function> returns
0.
158 The client and server may support different versions.
159 <function>glGetString
</function> always returns a compatible version number.
160 The release number always describes the server.
163 <refsect1 id=
"errors"><title>Errors
</title>
165 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>name
</parameter> is not an accepted value.
168 <constant>GL_INVALID_VALUE
</constant> is generated by
<function>glGetStringi
</function> if
169 <parameter>index
</parameter> is outside the valid range for indexed state
<parameter>name
</parameter>.
172 <refsect1 id=
"Copyright"><title>Copyright
</title>
174 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
175 Silicon Graphics, Inc. Copyright
<trademark class=
"copyright"></trademark> 2010
176 Khronos Group. This document is licensed under the SGI
177 Free Software B License. For details, see
178 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.