Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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