diff TaskManager/Test/test_render/viewer.h @ 109:5c194c71eca8

Cerium cvs version
author gongo@gendarme.local
date Wed, 12 Nov 2008 17:39:33 +0900
parents
children 949af5ee555e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Test/test_render/viewer.h	Wed Nov 12 17:39:33 2008 +0900
@@ -0,0 +1,45 @@
+#ifndef INCLUDED_VIEWER
+#define INCLUDED_VIEWER
+
+#include <SDL.h>
+
+#ifndef INCLUDED_VIEWER_TYPES
+#  include "viewer_types.h"
+#endif
+
+class Viewer {
+public:
+    Viewer(int bpp, int width, int height, int spenum);
+
+    virtual ~Viewer(void) {}
+
+    /* screen info */
+    int width;
+    int height;
+    int bpp;
+
+    int spe_num;
+
+    int rgb_size[3];
+    Uint32 video_flags;
+    Uint32 *pixels;
+
+    virtual void video_init(void) = 0;
+    void init();
+
+    int get_ticks();
+    bool quit_check();
+    void quit();
+
+    virtual void swap_buffers();
+    virtual void clean_pixels() {}
+
+    virtual void run_init(char *xml);
+    virtual void run_loop(void);
+    virtual void run_draw(void);
+    virtual void run_finish(void);
+};
+
+#endif
+
+#define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK