[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glGetString Subroutine

Purpose

Returns a string describing the current GL connection.

Library

OpenGL C bindings library: libGL.a

C Syntax

const GLubyte * glGetString(GLenum Parameter1)

Parameters

Parameter1 Specifies a symbolic constant, one of GL_VENDOR, GL_RENDERER, GL_VERSION, or GL_EXTENSIONS.

Description

The glGetString subroutine returns a pointer to a static string describing some aspect of the current GL connection. The Parameter1 parameter can be one of the following values:

GL_VENDOR Returns the name of the company responsible for this GL 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 GL.

Because GL 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 GL usage based on known performance characteristics of these platforms. Together, strings GL_VENDOR and GL_RENDERER uniquely specify a platform, and do not change from release to release. These strings 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 do not include space characters and are separated by space characters in the GL_EXTENSIONS string, and all strings are null-terminated.

Notes

If an error is generated, glGetString returns 0 (zero).

Errors

GL_INVALID_ENUM Parameter1 is not an accepted value.
GL_INVALID_OPERATION The glGetString subroutine is called between a call to glBegin and the corresponding call to glEnd.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]