Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Enumerations | Functions
glutil Namespace Reference

The main namespace for the GL Utility library. All GL Util functions are in this namespace. More...

Classes

class  GlyphQuad
 Data type for a single glyph. More...
 
class  InvalidEncodingException
 Thrown if a supposedly UTF-8 encoded string is not valid UTF-8. More...
 
class  Font
 The class that represents a series of glyphs as well as the information to layout a string of text. More...
 
class  MatrixStack
 Implements a stack for glm::mat4 transformations. More...
 
class  PushStack
 RAII-style object for pushing/popping MatrixStack objects. More...
 
class  ViewProvider
 Abstract base class used by ViewPole to identify that it provides a viewing matrix. More...
 
struct  ObjectData
 Utility object containing the ObjectPole's position and orientation information. More...
 
class  ObjectPole
 Mouse-based control over the orientation and position of an object. More...
 
struct  ViewData
 Utility object containing the ViewPole's view information. More...
 
struct  ViewScale
 Utility object describing the scale of the ViewPole. More...
 
class  ViewPole
 Mouse-based control over the orientation and position of the camera. More...
 
class  ShaderException
 Base class for all exceptions thrown by shader and program creation functions. More...
 
class  SeparateShaderNotSupported
 Thrown if the user requests the creation of separate programs, but the implementation cannot do that. More...
 
class  CompileLinkException
 Thrown if the compilation or linking fails. The log will be stored in this exception. More...
 
class  UniqueShader
 RAII object for managing a shader object. More...
 
class  UniqueProgram
 RAII object for managing a program object. More...
 

Enumerations

enum  OutputLocation { STD_OUT, STD_ERR }
 Possible locations for debug outputs. More...
 
enum  FontSizes { FONT_SIZE_SMALL, FONT_SIZE_MEDIUM, FONT_SIZE_LARGE, FONT_SIZE_GIANT }
 The allowed sizes for fonts. More...
 
enum  PointReference { REF_BASELINE, REF_BOTTOM, REF_TOP }
 Defines what the vertical value of the point represents. More...
 
enum  MouseButtons { MB_LEFT_BTN = 1, MB_MIDDLE_BTN, MB_RIGHT_BTN }
 The possible buttons that Poles can use. More...
 
enum  MouseModifiers { MM_KEY_SHIFT = 0x01, MM_KEY_CTRL = 0x02, MM_KEY_ALT = 0x04 }
 Bitfield for modifiers that may be held down while mouse movements go on. More...
 
enum  HorizWindowPos { WH_CENTER, WH_LEFT, WH_RIGHT }
 Horizontal window positions. More...
 
enum  VertWindowPos { WV_CENTER, WV_TOP, WV_BOTTOM }
 Vertical window positions. More...
 

Functions

FontGenerateFont (FontSizes eSize)
 Creates a font with the given size and characteristics. More...
 
glm::ivec2 CalcWindowPosition (const glm::ivec2 &wndSize, const glm::ivec2 &desktopSize, HorizWindowPos hpos=WH_CENTER, VertWindowPos vpos=WV_CENTER)
 Compute the position of the window relative to the desktop area. More...
 
Debug Output Piping
bool RegisterDebugOutput (OutputLocation eLoc)
 Registers a function for automatically outputting debug messages. More...
 
Error Codes

These functions are used to convert OpenGL error codes into human-readable strings.

std::string ErrorCodeToEnumString (GLenum errorCode)
 Generates the enumerator string for an OpenGL error code. More...
 
std::string ErrorCodeToDescription (GLenum errorCode)
 Generates a string description for an OpenGL error code. More...
 
std::string FramebufferToEnumString (GLenum framebufferStatus)
 Generates the enumerator string for an OpenGL framebuffer status code. More...
 
std::string FramebufferToDescription (GLenum framebufferStatus)
 Generates a description for an OpenGL framebuffer status code. More...
 
Shader Compilation

These functions generate shaders from text strings. They will throw exceptions in the event of compilation failure.

GLuint CompileShader (GLenum shaderType, boost::string_ref shaderText)
 Creates a shader object and compiles it with the given text string. More...
 
GLuint CompileShader (GLenum shaderType, refs::array_ref< const char * > shaderList)
 As CompileShader(GLenum, const char *), but with a list of strings.
 
GLuint CompileShader (GLenum shaderType, const std::vector< std::string > &shaderList)
 As CompileShader(GLenum, const char *), but with a list of strings.
 
Program Linking

These functions take one or more shader objects and link them together into a program. In the event of a linker error, they will throw an exception.

All shader objects are detached from the program that is returned.

GLuint LinkProgram (GLuint shaderOne, GLuint shaderTwo)
 Links the two shader objects into a single program. More...
 
GLuint LinkProgram (GLuint program, GLuint shaderOne, GLuint shaderTwo)
 As LinkProgram(GLuint, GLuint), except that it is given a program to do the linking within.
 
GLuint LinkProgram (boost::string_ref vertexShader, boost::string_ref fragmentShader)
 Creates a program from two shader strings, one for a vertex shader and one for a fragment shader. More...
 
GLuint LinkProgram (GLuint program, boost::string_ref vertexShader, boost::string_ref fragmentShader)
 As LinkProgram(boost::string_ref, boost::string_ref), except that it is given a program to do the linking within.
 
GLuint LinkProgram (GLuint shader, bool isSeparable=false)
 Takes a single shader and links it into a program. More...
 
GLuint LinkProgram (refs::array_ref< GLuint > shaders, bool isSeparable=false)
 As LinkProgram(GLuint, bool), only with a list of shaders.
 
GLuint LinkProgram (GLuint program, refs::array_ref< GLuint > shaders)
 Takes a program and links a number of shaders to it. More...
 
Separable Program Creation

These functions generate separable programs from text strings. They will throw exceptions in the event that ARB_separate_shader_objects or GL 4.1+ are not available. Exceptions will also be thrown if the compiling/linking fails.

GLuint MakeSeparableProgram (GLenum shaderType, const char *shaderText)
 Creates a single-stage separable program from the given shader text. More...
 
GLuint MakeSeparableProgram (GLenum shaderType, const std::string &shaderText)
 Creates a single-stage separable program from the given shader text. More...
 
GLuint MakeSeparableProgram (GLenum shaderType, refs::array_ref< const char * > shaderList)
 As MakeSeparableProgram(GLenum, const char *), except with a list of strings.
 
GLuint MakeSeparableProgram (GLenum shaderType, const std::vector< std::string > &shaderList)
 As MakeSeparableProgram(GLenum, const char *), except with a list of strings.
 

Detailed Description

The main namespace for the GL Utility library. All GL Util functions are in this namespace.