CSCI441 OpenGL Library 6.0.1.1
CS@Mines CSCI441 Computer Graphics Course Library
Loading...
Searching...
No Matches
Namespaces | Functions
OpenGLUtils.hpp File Reference

Helper functions to work with OpenGL 3.0+. More...

#include "constants.h"
#include <glad/gl.h>
#include <glm/glm.hpp>
#include <cstdio>
#include <cstdlib>

Go to the source code of this file.

Namespaces

namespace  CSCI441
 CSCI441 Helper Functions for OpenGL.
 
namespace  OpenGLUtils
 contains OpenGL Utility functions
 

Functions

void CSCI441::OpenGLUtils::printOpenGLInfo ()
 Prints information about our OpenGL context.
 
void CSCI441::OpenGLUtils::printOpenGLExtensions ()
 Prints the list of available extensions.
 
void CSCI441::OpenGLUtils::checkOpenGLErrors (const char *str="")
 Checks if there are any OpenGL errors, printing them if so, and clearing the error flag.
 
const char * CSCI441::OpenGLUtils::openGLErrorMessage (GLenum err)
 Converts error value to string representation.
 
const char * CSCI441::OpenGLUtils::debugSourceToString (GLenum source)
 Converts debug source value to string representation.
 
const char * CSCI441::OpenGLUtils::debugTypeToString (GLenum type)
 Converts debug type value to string representation.
 
const char * CSCI441::OpenGLUtils::debugSeverityToString (GLenum severity)
 Converts debug severity value to string representation.
 

Detailed Description

Helper functions to work with OpenGL 3.0+.

Author
Dr. Jeffrey Paone

These functions, classes, and constants help minimize common code that needs to be written.

Warning
NOTE: This header file depends upon GLAD (or alternatively GLEW)
NOTE: This header file depends upon glm

Function Documentation

◆ checkOpenGLErrors()

void CSCI441::OpenGLUtils::checkOpenGLErrors ( const char *  str = "")
inline

Checks if there are any OpenGL errors, printing them if so, and clearing the error flag.

Parameters
stroptional string to display if errors do occur (useful to help determine which call to this function triggered the errors)

◆ debugSeverityToString()

const char * CSCI441::OpenGLUtils::debugSeverityToString ( GLenum  severity)
inline

Converts debug severity value to string representation.

Parameters
severitydebug severity
Returns
severity of debug message

◆ debugSourceToString()

const char * CSCI441::OpenGLUtils::debugSourceToString ( GLenum  source)
inline

Converts debug source value to string representation.

Parameters
sourcedebug source
Returns
name of debug source

◆ debugTypeToString()

const char * CSCI441::OpenGLUtils::debugTypeToString ( GLenum  type)
inline

Converts debug type value to string representation.

Parameters
typedebug type
Returns
type of debug message

◆ openGLErrorMessage()

const char * CSCI441::OpenGLUtils::openGLErrorMessage ( GLenum  err)
inline

Converts error value to string representation.

Parameters
errOpenGL error code
Returns
name of error