polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

debug.h (492B)


      1 
      2 #ifndef POLYADVENT_DEBUG_H
      3 #define POLYADVENT_DEBUG_H
      4 
      5 #include "gl.h"
      6 
      7 void show_info_log(GLuint shader);
      8 
      9 // rtassert exists in release builds, use sparingly
     10 #define rtassert(cond, msg) if (!cond) { \
     11         fprintf(stderr, "FATAL %s:%d %s\n", __FILE__, __LINE__, msg); \
     12         exit(1); \
     13     }
     14 
     15 #define unusual(...) fprintf(stderr, "UNUSUAL: " __VA_ARGS__)
     16 
     17 #ifdef DEBUG
     18 #define debug(...) fprintf(stderr, __VA_ARGS__)
     19 #else
     20 #define debug(...)
     21 #endif
     22 
     23 
     24 #endif /* POLYADVENT_DEBUG_H */