1 | // |
---|
2 | // Lol Engine - Debug Quad test program |
---|
3 | // |
---|
4 | // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | // This program is free software; you can redistribute it and/or |
---|
6 | // modify it under the terms of the Do What The Fuck You Want To |
---|
7 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
8 | // http://sam.zoy.org/projects/COPYING.WTFPL for more details. |
---|
9 | // |
---|
10 | |
---|
11 | #if defined HAVE_CONFIG_H |
---|
12 | # include "config.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include "core.h" |
---|
16 | #include "lolgl.h" |
---|
17 | #include "loldebug.h" |
---|
18 | |
---|
19 | using namespace std; |
---|
20 | using namespace lol; |
---|
21 | |
---|
22 | #if defined __CELLOS_LV2__ |
---|
23 | # include "platform/ps3/ps3app.h" |
---|
24 | #elif defined HAVE_GLES_2X |
---|
25 | # include "eglapp.h" |
---|
26 | #else |
---|
27 | # include "platform/sdl/sdlapp.h" |
---|
28 | # include "platform/sdl/sdlinput.h" |
---|
29 | #endif |
---|
30 | |
---|
31 | #if USE_SDL && defined __APPLE__ |
---|
32 | # include <SDL_main.h> |
---|
33 | #endif |
---|
34 | |
---|
35 | #if defined _WIN32 |
---|
36 | # undef main /* FIXME: still needed? */ |
---|
37 | #endif |
---|
38 | |
---|
39 | int main(int argc, char **argv) |
---|
40 | { |
---|
41 | #if defined __CELLOS_LV2__ |
---|
42 | Ps3App app("Quad", ivec2(640, 480), 60.0f); |
---|
43 | #elif defined HAVE_GLES_2X |
---|
44 | EglApp app("Quad", ivec2(640, 480), 60.0f); |
---|
45 | #else |
---|
46 | SdlApp app("Quad", ivec2(640, 480), 60.0f); |
---|
47 | #endif |
---|
48 | |
---|
49 | /* Register an input driver and some debug stuff */ |
---|
50 | #if !defined HAVE_GLES_2X |
---|
51 | new SdlInput(); |
---|
52 | #endif |
---|
53 | new DebugFps(5, 5); |
---|
54 | new DebugQuad(); |
---|
55 | |
---|
56 | app.Run(); |
---|
57 | |
---|
58 | return EXIT_SUCCESS; |
---|
59 | } |
---|
60 | |
---|