/[libvob]/libvob/include/vob/glerr.hxx
ViewVC logotype

Diff of /libvob/include/vob/glerr.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Wed Jun 11 17:41:55 2003 UTC revision 1.3 by tjl, Fri Oct 10 13:52:19 2003 UTC
# Line 28  glerr.hxx Line 28  glerr.hxx
28    
29  #include <GL/glu.h>  #include <GL/glu.h>
30    
31  #define GLERR { int er = glGetError(); if(er != GL_NO_ERROR) \  namespace Vob {
32        extern int vobglErrorVariable;
33    }
34    
35    /** Show a GL error, if one has occurred. Requires semicolon,
36     * allows more stream output to error stream.
37     * Example use:
38     * <pre>
39     *    glFoo(...);
40     *    GLERR << localVariable << " " << localVariable2;
41     *    glBar(...);
42     *    GLERR;
43     * </pre>
44     */
45    #define GLERR if((vobglErrorVariable = glGetError()) != GL_NO_ERROR) \
46                      cout << "===== OPENGL ERROR "<<__FILE__<<" "<<__LINE__ \                      cout << "===== OPENGL ERROR "<<__FILE__<<" "<<__LINE__ \
47                          <<"  "<<gluErrorString(er)<<"\n"; \                          <<"  "<<gluErrorString(vobglErrorVariable)<<"\n"
             }  
48    
49    
50  #define STKS { if(dbg) {int sa, sm; glGetIntegerv(GL_ATTRIB_STACK_DEPTH, &sa); \  #define STKS { if(dbg) {int sa, sm; glGetIntegerv(GL_ATTRIB_STACK_DEPTH, &sa); \

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26