glGetString
[New
- Windows 95, OEM Service Release 2]
The glGetString
function returns a string describing the current OpenGL connection.
const GLubyte
* glGetString(
GLenum name |
|
); |
|
Parameters
name
One of the
following symbolic constants:
GL_VENDOR
Returns the
company responsible for this OpenGL implementation. This name does not change
from release to release.
GL_RENDERER
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.
GL_VERSION
Returns a
version or release number.
GL_EXTENSIONS
Returns a
space-separated list of supported extensions to OpenGL.
Remarks
The glGetString
function returns a pointer to a static string describing some aspect of the
current OpenGL connection.
Because
OpenGL does not include queries for the performance characteristics of an
implementation, it is expected that some applications will be written to
recognize known platforms and will modify their OpenGL usage based on known
performance characteristics of these platforms. The strings GL_VENDOR and
GL_RENDERER together uniquely specify a platform, and will not change from
release to release. They should be used by such platform recognition
algorithms.
The format
and contents of the string that glGetString returns depend on the
implementation, except that:
Extension names will not
include space characters and will be separated by space characters in the
GL_EXTENSIONS string.
All strings are
null-terminated.
If an error
is generated, glGetString returns zero.
Error Codes
The following
are the error codes generated and their conditions.
Error
Code |
Condition |
GL_INVALID_ENUM
|
name was not an accepted value. |
GL_INVALID_OPERATION
|
glGetString was called between a call to glBegin and the
corresponding call to glEnd. |
See Also
glBegin, glEnd