glerrorcheck.h File Reference

Define the OPENGL_ERROR_CHECK macro. More...

#include <config.h>
#include <iostream>

Go to the source code of this file.

Defines

#define OPENGL_ERROR_CHECK(cmd)
 The following macro checks if an OpenGL has occurred.

Detailed Description

Define the OPENGL_ERROR_CHECK macro.

Definition in file glerrorcheck.h.


Define Documentation

#define OPENGL_ERROR_CHECK ( cmd   ) 
Value:
cmd; \
  { \
    GLenum error = GL_NO_ERROR; \
    while ((error = glGetError()) != GL_NO_ERROR) { \
      std::cerr << "OpenGL error found. [ " << __FILE__ \
                << " : " << __LINE__ \
                << " : " << #cmd \
                << " ] \"" << gluErrorString(error) \
                << "\"." << std::endl; \
    } \
  }

The following macro checks if an OpenGL has occurred.

Parameters:
cmd The command to check.

This macro is based on that found in the notes for SIGGRAPH 2003 Course 26. It is modified here to use C++ (it was originally in C) and in the output format.

Definition at line 22 of file glerrorcheck.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:53 2013 for VVE by  doxygen 1.6.3