core/vgui/vgui_macro.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_macro.h
00002 #ifndef vgui_macro_h_
00003 #define vgui_macro_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author fsm
00010 // \brief  Some handy preprocessor macros commonly used in vgui
00011 //
00012 // Do not include <vcl_iostream.h> from this file.
00013 
00014 
00015 //: Handy gl debugging macro.
00016 //  Sprinkle through your code, and it will report any accumulated OpenGL errors
00017 #define vgui_macro_report_errors vgui_macro_error_reporter(__FILE__,__LINE__)
00018 
00019 
00020 //: Handy for printing warnings stamped with the location of the source line.
00021 // E.g. vgui_macro_warning << "no more megabytes" << endl;
00022 // You will need to include vcl_iostream to use this.
00023 #define vgui_macro_warning (vcl_cerr << __FILE__ ", line " << __LINE__ << ": ")
00024 
00025 
00026 // internals
00027 extern void vgui_macro_error_reporter(char const *FILE, int LINE);
00028 
00029 #endif // vgui_macro_h_