Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> | |
3 | <!-- saved from url=(0013)about:internet --> | |
4 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glGetString - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGetString"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetString — return a string describing the current GL connection</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">const GLubyte* <b class="fsfunc">glGetString</b>(</code>GLenum <var class="pdparam">name</var><code>)</code>;</p></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">const GLubyte* <b class="fsfunc">glGetStringi</b>(</code></td><td>GLenum </td><td><var class="pdparam">name</var>, </td></tr><tr><td> </td><td>GLuint </td><td><var class="pdparam">index</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p> | |
5 | Specifies a symbolic constant, one of | |
6 | <code class="constant">GL_VENDOR</code>, <code class="constant">GL_RENDERER</code>, | |
7 | <code class="constant">GL_VERSION</code>, or <code class="constant">GL_SHADING_LANGUAGE_VERSION</code>. | |
8 | Additionally, <code class="function">glGetStringi</code> accepts the <code class="constant">GL_EXTENSIONS</code> token. | |
9 | </p></dd><dt><span class="term"><em class="parameter"><code>index</code></em></span></dt><dd><p> | |
10 | For <code class="function">glGetStringi</code>, specifies the index of the string to return. | |
11 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
12 | <code class="function">glGetString</code> returns a pointer to a static string | |
13 | describing some aspect of the current GL connection. | |
14 | <em class="parameter"><code>name</code></em> can be one of the following: | |
15 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_VENDOR</code></span></dt><dd><p> | |
16 | </p><p> | |
17 | Returns the company responsible for this GL implementation. | |
18 | This name does not change from release to release. | |
19 | </p></dd><dt><span class="term"><code class="constant">GL_RENDERER</code></span></dt><dd><p> | |
20 | </p><p> | |
21 | Returns the name of the renderer. | |
22 | This name is typically specific to a particular configuration of a hardware | |
23 | platform. | |
24 | It does not change from release to release. | |
25 | </p></dd><dt><span class="term"><code class="constant">GL_VERSION</code></span></dt><dd><p> | |
26 | </p><p> | |
27 | Returns a version or release number. | |
28 | </p></dd><dt><span class="term"><code class="constant">GL_SHADING_LANGUAGE_VERSION</code></span></dt><dd><p> | |
29 | </p><p> | |
30 | Returns a version or release number for the shading language. | |
31 | </p></dd></dl></div><p> | |
32 | <code class="function">glGetStringi</code> returns a pointer to a static string | |
33 | indexed by <em class="parameter"><code>index</code></em>. | |
34 | <em class="parameter"><code>name</code></em> can be one of the following: | |
35 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_EXTENSIONS</code></span></dt><dd><p> | |
36 | </p><p> | |
37 | For <code class="function">glGetStringi</code> only, returns the extension string | |
38 | supported by the implementation at <em class="parameter"><code>index</code></em>. | |
39 | </p></dd></dl></div><p> | |
40 | Strings <code class="constant">GL_VENDOR</code> and <code class="constant">GL_RENDERER</code> together uniquely specify | |
41 | a platform. They do not change from release to release and should be used | |
42 | by platform-recognition algorithms. | |
43 | </p><p> | |
44 | The <code class="constant">GL_VERSION</code> and <code class="constant">GL_SHADING_LANGUAGE_VERSION</code> strings begin with a version number. | |
45 | The version number uses one | |
46 | of these forms: | |
47 | </p><p> | |
48 | <span class="emphasis"><em>major_number.minor_number</em></span> | |
49 | <span class="emphasis"><em>major_number.minor_number.release_number</em></span> | |
50 | </p><p> | |
51 | Vendor-specific information may follow the version | |
52 | number. Its format depends on the implementation, but | |
53 | a space always separates the version number and | |
54 | the vendor-specific information. | |
55 | </p><p> | |
56 | All strings are null-terminated. | |
57 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
58 | If an error is generated, <code class="function">glGetString</code> returns 0. | |
59 | </p><p> | |
60 | The client and server may support different versions. | |
61 | <code class="function">glGetString</code> always returns a compatible version number. | |
62 | The release number always describes the server. | |
63 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
64 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>name</code></em> is not an accepted value. | |
65 | </p><p> | |
66 | <code class="constant">GL_INVALID_VALUE</code> is generated by <code class="function">glGetStringi</code> if | |
67 | <em class="parameter"><code>index</code></em> is outside the valid range for indexed state <em class="parameter"><code>name</code></em>. | |
68 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
69 | Copyright <span class="trademark"></span>© 1991-2006 | |
70 | Silicon Graphics, Inc. Copyright <span class="trademark"></span>© 2010 | |
71 | Khronos Group. This document is licensed under the SGI | |
72 | Free Software B License. For details, see | |
73 | <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
74 | </p></div></div></body></html> |