Clone of mesa.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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. }