forked from projectM-visualizer/projectm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglError.h
More file actions
31 lines (25 loc) · 636 Bytes
/
Copy pathglError.h
File metadata and controls
31 lines (25 loc) · 636 Bytes
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
29
30
//
// File: glError.h
// Author: fatray
//
// Created on 02 December 2007, 16:08
//
#ifndef _GLERROR_H
#define _GLERROR_H
// no need to include GL in here,
// if someone wants GL errors they probably already included it.
/*
* if we are debugging, print all glErrors to stderr.
* Remeber that glErrors are buffered, this just prints any in the buffer.
*/
#ifdef NDEBUG
#define glError()
#else
#define glError() { \
GLenum err; \
while ((err = glGetError()) != GL_NO_ERROR) \
fprintf(stderr, "glError: %s at %s:%u\n", \
(char *)gluErrorString(err), __FILE__, __LINE__); \
}
#endif /* glError */
#endif /* _GLERROR_H */