diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 11:42:01 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 11:42:01 -0500 |
commit | cefdff9a6a449506ddaeae56a2e038a1a2106846 (patch) | |
tree | e5753b372848e62528ed08b5c2d70d406914a16f /base.h | |
parent | f6fe651ed8bedb0308f75a7b15ef913add799848 (diff) |
converted everything to modern opengl
for some reason SDL_GL_SwapWindow seems to be in a busy loop?
Diffstat (limited to 'base.h')
-rw-r--r-- | base.h | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -112,11 +112,8 @@ typedef unsigned long long ullong; #define no_warn_end #endif -#if DEBUG -#if __unix__ -#define debug_print(...) printf(__VA_ARGS__) -#else // __unix__ -static void debug_print(char const *fmt, ...) { +#if _WIN32 +static void print(char const *fmt, ...) { char buf[256]; va_list args; va_start(args, fmt); @@ -124,9 +121,15 @@ static void debug_print(char const *fmt, ...) { va_end(args); OutputDebugStringA(buf); } -#endif // __unix__ -#define debug_println(...) debug_print(__VA_ARGS__), debug_print("\n") -#else // DEBUG +#else +#define print printf +#endif +#define println(...) print(__VA_ARGS__), print("\n") + +#if DEBUG +#define debug_print print +#define debug_println println +#else #define debug_print(...) #define debug_println(...) #endif |