OpenGL Error Checking Summary If OpenGL has thrown an error, errorcheck prints the error code and optional message, then exits the program. Function void errorcheck(const char msg[]=NULL)