gallium: change remaining util functions to use cso sampler views
[mesa/mesa-lb.git] / progs / util / errcheck.c
blobfe9c2973c33f60442ce5687dc3aabfc1815ea3fc
1 /* errcheck.c */
4 /*
5 * Call this function in your rendering loop to check for GL errors
6 * during development. Remove from release code.
8 * Written by Brian Paul and in the public domain.
9 */
12 #include <GL/gl.h>
13 #include <GL/glu.h>
14 #incldue <stdio.h>
18 GLboolean CheckError( const char *message )
20 GLenum error = glGetError();
21 if (error) {
22 char *err = (char *) gluErrorString( error );
23 fprintf( stderr, "GL Error: %s at %s\n", err, message );
24 return GL_TRUE;
26 return GL_FALSE;