summaryrefslogtreecommitdiffstats
path: root/src/util/check_error.c (plain)
blob: 35a4f6c3472acc79ce33962c15fa844a41442884
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <GL/glut.h>
#include <stdlib.h>
#include "check_error_db.h"

void
check_error (const char *filename, const unsigned int linenum)
{

  /*
   * Check for an error from the OpenGL API.
   */
  GLenum errCode = glGetError ();
  if (errCode != GL_NO_ERROR)
    {
      const GLubyte *errString = gluErrorString (errCode);
      printf ("%s:%u OpenGL Error %s", filename, linenum, errString);
      exit (-1);
    }

  /*
   * Check for an error from the Database API.
   */
  check_error_db (filename, linenum);

  return;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.