CGVIS Utils
Loading...
Searching...
No Matches
GLDebug.cpp File Reference
#include <sstream>
#include <vector>
#include "GLEnv.h"
#include "GLDebug.h"
Include dependency graph for GLDebug.cpp:

Functions

std::string errorString (GLenum glerr)
 Convert a GL error enum to a short string (e.g., "GL_INVALID_VALUE").
void errorOut (const std::string &statement, const std::string &location, uint32_t line, const std::string &file, uint32_t errnum)
 Internal printer used by the GL() macro to emit formatted errors.
void checkAndThrow ()
 Throw a GLException if glGetError() reports an error.
void checkAndThrowShader (GLuint shader)
 Check a shader object's compile status and throw with its log on error.
void checkAndThrowProgram (GLuint program)
 Check a program object's link status and throw with its log on error.

Function Documentation

◆ checkAndThrow()

void checkAndThrow ( )

Throw a GLException if glGetError() reports an error.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkAndThrowProgram()

void checkAndThrowProgram ( GLuint program)

Check a program object's link status and throw with its log on error.

Parameters
programProgram object name returned by glCreateProgram().

◆ checkAndThrowShader()

void checkAndThrowShader ( GLuint shader)

Check a shader object's compile status and throw with its log on error.

Parameters
shaderShader object name returned by glCreateShader().

◆ errorOut()

void errorOut ( const std::string & statement,
const std::string & location,
uint32_t line,
const std::string & file,
uint32_t errnum )

Internal printer used by the GL() macro to emit formatted errors.

Parameters
statementThe stringified GL statement being executed.
locationOne of "before" or "in" indicating when the error occurred.
lineSource line number.
fileSource file name.
errnumNumeric GL error code.
Here is the call graph for this function:

◆ errorString()

std::string errorString ( GLenum glerr)

Convert a GL error enum to a short string (e.g., "GL_INVALID_VALUE").

Parameters
glerrError code returned by glGetError().
Returns
Human-readable token for common error codes or "Unknown Error".
Here is the caller graph for this function: