path:
root/
src/
util/
check_error.c (
plain)
blob: 7d116e97407a582f3a9ea46ad82a53db253b019e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <GL/glut.h>
#include <error.h>
#include <errno.h>
#include <stdlib.h>
#include "check_error_db.h"
void
check_error (const char *filename, const unsigned int linenum)
{
/*
* Check for an error from the OpenGL API.
*/
GLenum errCode = glGetError ();
if (errCode != GL_NO_ERROR)
{
const GLubyte *errString = gluErrorString (errCode);
error_at_line (EXIT_FAILURE, errno, filename, linenum,
"OpenGL Error %s", errString);
}
/*
* Check for an error from the Database API.
*/
check_error_db (filename, linenum);
return;
}
|