home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 2000 April & May
/
AMIGA_2000_04.iso
/
patches
/
mesa3.1
/
util
/
errcheck.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-08-18
|
519b
|
28 lines
/* errcheck.c */
/*
* Call this function in your rendering loop to check for GL errors
* during development. Remove from release code.
*
* Written by Brian Paul and in the public domain.
*/
#include <GL/gl.h>
#include <GL/glu.h>
#incldue <stdio.h>
GLboolean CheckError( const char *message )
{
GLenum error = glGetError();
if (error) {
char *err = (char *) gluErrorString( error );
fprintf( stderr, "GL Error: %s at %s\n", err, message );
return GL_TRUE;
}
return GL_FALSE;
}