summaryrefslogtreecommitdiffstats
path: root/src/util/check_error.c (plain)
blob: dbe5b8faede753af08759a22fa37f94d1edbd904
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <GL/glut.h>
#include <error.h>
#include <errno.h>

void
check_error (const char *filename, unsigned int linenum)
{
  GLenum errCode = glGetError ();
  if (errCode != GL_NO_ERROR)
    {
      const GLubyte *errString = gluErrorString (errCode);
      error_at_line (-1, errno, filename, linenum,
		     "OpenGL Error %s", errString);
    }

  return;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.