Mercurial > sdl-ios-xcode
comparison test/common.h @ 1914:051df511279c
Added a test program framework for easy initialization.
Started work on multi-window OpenGL demo
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 18 Jul 2006 07:49:51 +0000 |
parents | |
children | 7ee5297340f7 |
comparison
equal
deleted
inserted
replaced
1913:83420da906a5 | 1914:051df511279c |
---|---|
1 | |
2 /* A simple test program framework */ | |
3 | |
4 #include "SDL.h" | |
5 | |
6 #define VERBOSE_VIDEO 0x00000001 | |
7 #define VERBOSE_MODES 0x00000002 | |
8 #define VERBOSE_RENDER 0x00000004 | |
9 #define VERBOSE_EVENT 0x00000008 | |
10 #define VERBOSE_AUDIO 0x00000010 | |
11 | |
12 typedef struct | |
13 { | |
14 /* SDL init flags */ | |
15 char **argv; | |
16 Uint32 flags; | |
17 Uint32 verbose; | |
18 | |
19 /* Video info */ | |
20 const char *videodriver; | |
21 int display; | |
22 const char *window_title; | |
23 Uint32 window_flags; | |
24 int window_x; | |
25 int window_y; | |
26 int window_w; | |
27 int window_h; | |
28 int depth; | |
29 int refresh_rate; | |
30 int num_windows; | |
31 SDL_WindowID *windows; | |
32 | |
33 /* Renderer info */ | |
34 const char *renderdriver; | |
35 Uint32 render_flags; | |
36 | |
37 /* Audio info */ | |
38 const char *audiodriver; | |
39 SDL_AudioSpec audiospec; | |
40 } CommonState; | |
41 | |
42 extern CommonState *CommonCreateState(char **argv, Uint32 flags); | |
43 extern int CommonArg(CommonState * state, int index); | |
44 extern const char *CommonUsage(CommonState * state); | |
45 extern SDL_bool CommonInit(CommonState * state); | |
46 extern void CommonEvent(CommonState * state, SDL_Event * event, int *done); | |
47 extern void CommonQuit(CommonState * state); |