.Dd $Mdocdate$ .Dt GLGETSTRING 3G .Os .Sh NAME .Nm glGetString .Nd return a string describing the current GL connection .Sh SYNOPSIS .Ft const GLubyte* .Fo glGetString .Fa "GLenum name" .Fc .Ft const GLubyte* .Fo glGetStringi .Fa "GLenum name" .Fa "GLuint index" .Fc .Sh PARAMETERS .Bl -tag -width Ds .It Fa "name" Specifies a symbolic constant, one of .Dv GL_VENDOR , .Dv GL_RENDERER , .Dv GL_VERSION , or .Dv GL_SHADING_LANGUAGE_VERSION \&. Additionally, .Fn glGetStringi accepts the .Dv GL_EXTENSIONS token. .It Fa "index" For .Fn glGetStringi , specifies the index of the string to return. .El .Sh DESCRIPTION .Pp .Fn glGetString returns a pointer to a static string describing some aspect of the current GL connection. .Fa "name" can be one of the following: .Bl -tag -width Ds .It Dv GL_VENDOR Returns the company responsible for this GL implementation. This name does not change from release to release. .It Dv 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. .It Dv GL_VERSION Returns a version or release number. .It Dv GL_SHADING_LANGUAGE_VERSION Returns a version or release number for the shading language. .El .Pp .Fn glGetStringi returns a pointer to a static string indexed by .Fa "index" \&. .Fa "name" can be one of the following: .Bl -tag -width Ds .It Dv GL_EXTENSIONS For .Fn glGetStringi only, returns the extension string supported by the implementation at .Fa "index" \&. .El .Pp Strings .Dv GL_VENDOR and .Dv GL_RENDERER together uniquely specify a platform. They do not change from release to release and should be used by platform-recognition algorithms. .Pp The .Dv GL_VERSION and .Dv GL_SHADING_LANGUAGE_VERSION strings begin with a version number. The version number uses one of these forms: .Pp .Em major_number.minor_number .Em major_number.minor_number.release_number .Pp 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. .Pp All strings are null-terminated. .Sh NOTES .Pp If an error is generated, .Fn glGetString returns 0. .Pp The client and server may support different versions. .Fn glGetString always returns a compatible version number. The release number always describes the server. .Sh ERRORS .Pp .Dv GL_INVALID_ENUM is generated if .Fa "name" is not an accepted value. .Pp .Dv GL_INVALID_VALUE is generated by .Fn glGetStringi if .Fa "index" is outside the valid range for indexed state .Fa "name" \&. .Sh COPYRIGHT .Pp Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2010-2013 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/ \&.