Index

zydeco / 0dd781a

Experiment in graphics programming, C++, OpenGL, simulation techniques.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
405 Aug 2023 20:500dd781aCreate event handling and threads structureJosh Stockin1160G

Blob @ zydeco / include / sdl2 / CommonSDL2.hpp

text/plain452 bytesdownload raw
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