00001 #ifndef _UTILITY_HPP_ 00002 #define _UTILITY_HPP_ 00003 00004 #define STRINGIFY(x) #x 00005 #define TOSTRING(x) STRINGIFY(x) 00006 #define AT __FILE__ ":" TOSTRING(__LINE__) 00007 #define get_errors() my_get_errors(AT) 00008 00009 #include <string> 00010 00011 using namespace std; 00012 00013 bool file_exists(const string &filename); 00014 00015 string read_file(const string &filename); 00016 00017 // Query OpenGL errors and print error messages to STDERR. 00018 void my_get_errors(const char *location); 00019 00020 #endif