glGetString

Definition: include pGUI.e
include opengl.e

string res = glGetString(integer name)
Description: The glGetString function returns a string describing the current OpenGL connection.

name: One of the following symbolic constants, as defined in opengl.e
global constant GL_VENDOR     = #1F00,  -- Returns the company responsible for this OpenGL implementation. 
                                        -- This name does not change from release to release.
                GL_RENDERER   = #1F01,  -- Returns the name of the renderer, typically specific to a 
                                        -- particular configuration of a hardware platform. 
                                        -- It does not change from release to release.
                GL_VERSION    = #1F02,  -- Returns a version or release number.
                GL_EXTENSIONS = #1F03   -- Returns a space-separated list of supported extensions to OpenGL.

If name is none of the above values, glGetString returns "" and glGetError() will return GL_INVALID_ENUM.
If called between glBegin and glEnd, glGetString returns "" and glGetError() will return GL_INVALID_OPERATION.
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 as such by 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.
The GL_VERSION string begins with a version number. The version number uses one of these forms:
major_number.minor_number
major_number.minor_number.release_number
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.
All strings are null-terminated.
See Also: glBegin, glEnd