Experiment in graphics programming, C++, OpenGL, simulation techniques.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
4 | 05 Aug 2023 20:50 | 0dd781a | Create event handling and threads structure | Josh Stockin | 1 | 16 | 0 | G |
1 | #ifndef SDL2_HPP_ |
2 | #define SDL2_HPP_ |
3 | |
4 | |
5 | #include <SDL2/SDL.h> |
6 | |
7 | #include "ZydecoCommon.hpp" |
8 | |
9 | |
10 | #define SDL_CallErrorReturningFunction(FUNC_NAME, PARAMS...) if (FUNC_NAME(PARAMS) < 0) { ZydecoFault(#FUNC_NAME " error: {}", SDL_GetError()); } |
11 | |
12 | #define SDL_CallPointerReturningFunction(FUNC_NAME, NEW_PTR, PARAMS...) NEW_PTR = FUNC_NAME(PARAMS); \ |
13 | if (NEW_PTR == nullptr) { ZydecoFault(#FUNC_NAME " error: {}", SDL_GetError()); } |
14 | |
15 | |
16 | #endif /* SDL2_HPP_ */ |
17 |