GLSupport -- OpenGL Support Library

The GLSupport library contains classes and functions providing higher-level support for applications using OpenGL. The main functions of this library are per-context data management for multi-context rendering, run-time handling of OpenGL extensions, support for texture-based font rendering, and functions to draw simple 3D models such as spheres and cylinders.

Header Files

Config.h
Config.h defines configuration-dependent macros used by the GLSupport library. It should be included by client code that wants to make decisions based on the availability of optional features.
GLPrintError.h
GLPrintError contains a single helper function, glPrintError, to print clear-text OpenGL error messages to a std::ostream.
GLMarshallers.h
GLMarshallers.h contains specialized versions of the Misc::Marshaller class for several OpenGL-related data types.
GLValueCoders.h
GLValueCoders.h contains specialized versions of the Misc::ValueCoder class for several OpenGL-related data types.
TLSHelper.h
TLSHelper contains macro definitions to provide optimized thread-local storage for the internals of the OpenGL support library. It uses the Threads::Local class as a fallback mechanism if the compiler does not support the __thread keyword. This header file is not meant to be used directly by applications.
GLLightTracker.h
GLLightTracker is a helper class tracking the lighting state of an OpenGL context, to support just-in-time recompilation of shaders in reaction to changing lighting conditions.
GLClipPlaneTracker.h
GLClipPlaneTracker is a helper class tracking the clipping plane state of an OpenGL context, to support just-in-time recompilation of shaders in reaction to changing clipping plane conditions.
GLObject.h
GLObject is a base class for objects that contain per-context OpenGL data in a multi-pipe rendering environment where OpenGL state must be kept separate from other application state. GLObject handles initialization and deinitialization of OpenGL state once for each OpenGL context an object is rendered in. All OpenGL data related to an object is stored in a per-context GLObject::DataItem object. See GLContextData for a thorough explanation of the concepts behind the multi-pipe abstraction.
GLContextData.h
GLContextData is a class associating per-context OpenGL data with objects derived from GLObject. See GLContextData for a thorough explanation of the concepts behind the multi-pipe abstraction.
GLExtensions.h
GLExtensions.h contains functions to query the availability of OpenGL extensions in the current OpenGL context, and to retrieve pointers to extension entry points. This header file is deprecated; instead, OpenGL extensions are supposed to be handled by the GLExtensionManager mechanism.
GLExtensionManager.h
GLExtensionManager is a class to manage OpenGL extensions on a per-context basis. GLExtensionManager allows an application to query whether a particular extension is supported in the current context, and to initialize it. Initializing an OpenGL extension will create all of the extension's entry points such that applications can later call them directly by their name.
Extensions/*
The Extensions directory contains header files for all OpenGL extensions known to the extension manager. All extensions are represented as individual classes with identical APIs.
GLExtension.h
Base class for all extension classes.
GLARBDebugOutput
The GL_ARB_debug_output extension.
GLARBDepthTexture
The GL_ARB_depth_texture extension.
GLARBDrawBuffers
The GL_ARB_draw_buffers extension.
GLARBDrawInstanced
The GL_ARB_draw_instanced extension.
GLARBFragmentProgram
The GL_ARB_fragment_program extension.
GLARBFragmentShader
The GL_ARB_fragment_shader extension.
GLARBGeometryShader4
The GL_ARB_geometry_shader4 extension. This is functionally identical to GL_EXT_geometry_shader4, but uses ARB instead of EXT suffixes.
GLARBMultitexture
The GL_ARB_multitexture extension.
GLARBPointParameters
The GL_ARB_point_parameters extension.
GLARBPointSprite
The GL_ARB_point_sprite extension.
GLARBShaderObjects
The GL_ARB_shader_objects extension.
GLARBShadow
The GL_ARB_shadow extension.
GLARBTextureCompression
The GL_ARB_texture_compression extension.
GLARBTextureFloat
The GL_ARB_texture_float extension.
GLARBTextureNonPowerOfTwo
The GL_ARB_texture_non_power_of_two extension.
GLARBVertexArrayObject
The GL_ARB_vertex_array_object extension. According to the specification, functions and constants provided by this extension do not have the EXT or _EXT suffixes, respectively.
GLARBVertexBufferObject
The GL_ARB_vertex_buffer_object extension.
GLARBVertexProgram
The GL_ARB_vertex_program extension.
GLARBVertexShader
The GL_ARB_vertex_shader extension.
GLEXTFogCoord
The GL_EXT_fog_coord extension.
GLEXTFramebufferBlit
The GL_EXT_framebuffer_blit extension.
GLEXTFramebufferObject
The GL_EXT_framebuffer_object extension.
GLEXTGeometryShader4
The GL_EXT_geometry_shader4 extension. This is functionally identical to GL_ARB_geometry_shader4, but uses EXT instead of ARB suffixes.
GLEXTGpuShader4
The GL_EXT_gpu_shader4 extension.
GLEXTPalettedTexture
The GL_EXT_paletted_texture extension.
GLEXTRescaleNormal
The GL_EXT_rescale_normal extension.
GLEXTTexture3D
The GL_EXT_texture3D extension.
GLEXTTextureArray
The GL_EXT_texture_array extension.
GLEXTTextureCompressionS3TC
The GL_EXT_texture_compression_s3tc extension.
GLEXTTextureCubeMap
The GL_EXT_texture_cube_map extension.
GLEXTTextureInteger
The GL_EXT_texture_integer extension.
GLNVFogDistance
The GL_NV_fog_distance extension.
GLNVOcclusionQuery
The GL_NV_occlusion_query extension.
GLNVPointSprite
The GL_NV_point_sprite extension.
GLNVTextureShader
The GL_NV_texture_shader extension.
GLTextureObject.h
GLTextureObject is a helper class to simplify managing texture objects.
GLShader.h
GLShader is a helper class to simplify using GLSL shaders that compile any number of vertex and fragment shaders into a single shader program. Assumes the source code for all shaders is loaded from plain text files.
GLGeometryShader.h
GLGeometryShader is a child class of GLShader with additional support for geometry shaders following the GL_EXT_geometry_shader4 extension.
GLAutomaticShader.h
GLAutomaticShader is a base class for shaders that adapt themselves to the changing state of their associated OpenGL context.
GLLineLightingShader.h
GLLineLightingShader is an automatic shader class for Phong illumination of curves.
GLColorMap.h
GLColorMap is a class mapping scalar values in a given range to RGBA colors using linear interpolation between a number of control points.
GLFont.h
GLFont is a class to render 3D text using texture-based fonts. Text is normally rendered by uploading an entire string of text as a single texture (providing for kerning and/or aliasing), and then mapping that texture onto arbitrary polygons.
GLString.h
GLString is a class to simplify handling of 3D text using texture-based fonts, by associating a C-style string with the data required to draw said string using a GLFont object.
GLLabel.h
GLLabel is a class to simplify drawing 3D text, by encapsulating all data required to draw C-style strings using a texture-based font.
GLLineIlluminator.h
GLLineIlluminator is a class to render illuminated lines by tabulating the Phong lighting equation into a texture and manipulating the texture matrix to perform diffuse and specular illumination. It should be considered deprecated, since the same effect is much better achieved using vertex programs.
GLModels.h
GLModels.h contains several functions to draw simple 3D models such as spheres and cylinders.