diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-25 11:30:15 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-25 11:30:15 -0700 |
commit | 96cdbee9649d440161cff3088ca2a82ec1e54c78 (patch) | |
tree | a80e3e61e955582d7d29bd4d4800901302d96409 /tests/sdl_canvas.c | |
parent | 5739787049a07e1bf478af4bffad9e8906fb1e4b (diff) |
allow apps to link both GL and SDL 2D backends and use just one
Diffstat (limited to 'tests/sdl_canvas.c')
-rw-r--r-- | tests/sdl_canvas.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c index ab1340a8..5d1c849c 100644 --- a/tests/sdl_canvas.c +++ b/tests/sdl_canvas.c @@ -3,7 +3,18 @@ #include <SDL/SDL_ttf.h> #include <emscripten.h> -int main() { + +int main(int argc, char **argv) { +#if EMSCRIPTEN + // include GL stuff, to check that we can compile hybrid 2d/GL apps + extern void glBegin(int mode); + extern void glBindBuffer(int target, int buffer); + if (argc == 9876) { + glBegin(0); + glBindBuffer(0, 0); + } +#endif + SDL_Init(SDL_INIT_VIDEO); SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE); |