GLWrappers -- OpenGL Wrapper Library

The GLWrappers library contains classes and functions providing a C++ wrapper around the OpenGL API. This wrapper is an essential layer to support type-generic OpenGL programming in higher-level libraries. As a secondary function, the wrapper layer changes the design of the OpenGL API slightly to replace indexed enumerants such as light enums with proper indices, and to replace generic enumerants with function-specific enumerants to enable compile-time parameter checking.

Header Files

GLScalarLimits.h
GLScalarLimits is a templatized class describing traits and limits of integral OpenGL data types, to allow automatic conversion between integral types.
GLScalarConverter.h
GLScalarConverter is a templatized class supporting type conversions between integral OpenGL types that require a value transformation, for example the range transformation when converting a color with GLubyte components to a color with GLfloat components.
GLColor.h
GLColor is a class describing an RGB color value with optional opacity component. It is templatized by color component type and number of components, with implementations provided for all integral OpenGL types used to describe colors, and three and four components. The GLColor class provides convenient constructors with automatic conversions between component types, comparison operations, and componentwise access. Objects of class GLColor can be used as parameters for all OpenGL functions that expect color values.
GLColorOperations.h
GLColorOperations.h provides operations on objects of class GLColor. It supports the full range of RGB vector space operations, componentwise multiplication, and clamping of floating-point component colors.
GLVector.h
GLVector is a class describing three-dimensional homogeneous vectors, templatized by scalar type and number of actually stored vector components. Vector components not stored are treated as 0 for the second and third components, and as 1 for the fourth component. The GLVector class provides convenient constructors with automatic conversions between component types, comparison operations, and componentwise access. Objects of class GLVector can be used as parameters for all OpenGL functions that expect vector values, such as texture coordinates, normal vectors, and vertex positions.
GLBox.h
GLBox is a class representing three-dimensional axis-aligned rectangular boxes, templatized by the scalar type of the vector space and the number of actually stored vector components. Vector components not stored are treated as 0 for the second and third components, and as 1 for the fourth component.
GLTexCoordTemplates.h
GLTexCoordTemplates.h provides overloaded versions of the glTexCoord family of functions.
GLMultiTexCoordTemplates.h
GLMultiTexCoordTemplates.h provides overloaded versions of the glMultiTexCoord family of functions. The target parameter of glMultiTexCoord has been replaced with the index of the target texture unit.
GLColorTemplates.h
GLColorTemplates.h provides overloaded versions of the glColor family of functions.
GLSecondaryColorTemplates.h
GLSecondaryColorTemplates.h provides overloaded versions of the glSecondaryColor family of functions.
GLNormalTemplates.h
GLNormalTemplates.h provides overloaded versions of the glNormal family of functions.
GLVertexTemplates.h
GLVertexTemplates.h provides overloaded versions of the glVertex family of functions.
GLIndexTemplates.h
GLIndexTemplates.h provides overloaded versions of the glIndex family of functions.
GLPrimitiveTemplates.h
GLPrimitiveTemplates.h is a container header file that includes all other header files declaring overloaded versions of functions related to vertex property specification.
GLVertexArrayTemplates.h
GLVertexArrayTemplates.h provides overloaded versions of the gl...Pointer families of functions.
GLVertexArrayParts.h
GLVertexArrayParts is a class containing an enumerated type for all vertex properties that can be stored in vertex arrays, and functions to enable/disable client state related to vertex arrays.
GLVertex.h
GLVertex is a class representing the full state of a vertex, including texture coordinates, colors, normal vectors, and vertex positions. The class is templatized by the scalar types and numbers of components for each vertex property. GLVertex.h provides specialized versions of the GLVertex class for any subset of vertex properties, storing only those properties. The GLVertex class contains the stored properties as a GLVertexArrayParts mask. Finally, GLVertex.h provides overloaded versions of the glVertex and glVertexPointer family of functions, specifying all stored vertex properties at once.
GLFogEnums.h
GLFogEnums is a class containing enumerated types for enumerants related to fog specification.
GLFogTemplates.h
GLFogTemplates.h contains overloaded versions of the glFog family of functions, and functions providing a more type-safe interface to the fog API.
GLFog.h
GLFog is a class representing the entire state of the fog API. It provides convenient constructors for all types of fog, and overloaded glFog and glGetFog functions to set/get the full fog state at once.
GLLightEnums.h
GLLightEnums is a class containing enumerated types for enumerants related to light source specification.
GLLightTemplates.h
GLLightTemplates.h contains overloaded versions of the glLight family of functions, and functions providing a more type-safe interface to the light source API.
GLLight.h
GLLight is a class representing the entire state of a light source. It provides convenient constructors, and overloaded glLight and glGetLight functions to set/get the full state of a light source at once.
GLLightModelEnums.h
GLLightModelEnums is a class containing enumerated types for enumerants related to light model specification.
GLLightModelTemplates.h
GLLightModelTemplates.h contains overloaded versions of the glLightModel family of functions, and functions providing a more type-safe interface to the light model API.
GLMaterialEnums.h
GLMaterialEnums is a class containing enumerated types for enumerants related to material property specification.
GLMaterialTemplates.h
GLMaterialTemplates.h contains overloaded versions of the glMaterial family of functions, and functions providing a more type-safe interface to the material property API.
GLMaterial.h
GLMaterial is a class representing the entire state of a material property. It provides convenient constructors, and overloaded glMaterial and glGetMaterial functions to set/get the full state of a material property at once.
GLTexEnvEnums.h
GLTexEnvEnums is a class containing enumerated types for enumerants related to texture environment specification.
GLTexEnvTemplates.h
GLTexEnvTemplates.h contains overloaded versions of the glTexEnv family of functions, and functions providing a more type-safe interface to the texture environment API.
GLMatrixEnums.h
GLMatrixEnums is a class containing an enumerated type for enumerants related to matrix specification.
GLMatrixTemplates.h
GLMatrixTemplates.h contains overloaded versions of the matrix manipulation functions.
GLMiscTemplates.h
GLMiscTemplates.h contains overloaded versions of various OpenGL functions that have not yet been separated into their own header files.
GLGetTemplates.h
GLGetTemplates.h contains overloaded versions of the glGet family of functions.
GLGetPrimitiveTemplates.h
GLGetPrimitiveTemplates.h contains overloaded versions of the glGet family of functions as related to querying current vertex attributes.
GLGetFogTemplates.h
GLGetFogTemplates.h contains overloaded versions of the glGet family of functions as related to querying current fog state.
GLGetLightTemplates.h
GLGetLightTemplates.h contains overloaded versions of the glGetLight family of functions, and overloaded functions providing a more type-safe interface to the light source query API.
GLGetMaterialTemplates.h
GLGetMaterialTemplates.h contains overloaded versions of the glGetMaterial family of functions, and overloaded functions providing a more type-safe interface to the material property query API.
GLGetTexEnvTemplates.h
GLGetTexEnvTemplates.h contains overloaded versions of the glGetTexEnv family of functions, and overloaded functions providing a more type-safe interface to the texture environment query API.
GLGetMatrixTemplates.h
GLGetMatrixTemplates.h contains overloaded versions of the glGet family of functions as related to querying current matrix state.
GLGetMiscTemplates.h
GLGetMiscTemplates.h contains overloaded versions of the glGet family of functions as related to querying parts of OpenGL state that are not yet handled by separate header files.