Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errcheck.c 519B

123456789101112131415161718192021222324252627
  1. /* errcheck.c */
  2. /*
  3. * Call this function in your rendering loop to check for GL errors
  4. * during development. Remove from release code.
  5. *
  6. * Written by Brian Paul and in the public domain.
  7. */
  8. #include <GL/gl.h>
  9. #include <GL/glu.h>
  10. #incldue <stdio.h>
  11. GLboolean CheckError( const char *message )
  12. {
  13. GLenum error = glGetError();
  14. if (error) {
  15. char *err = (char *) gluErrorString( error );
  16. fprintf( stderr, "GL Error: %s at %s\n", err, message );
  17. return GL_TRUE;
  18. }
  19. return GL_FALSE;
  20. }