annotate TaskManager/Test/test_render/viewer.h @ 228:c254a2bd1b34

remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
author gongo@gendarme.cr.ie.u-ryukyu.ac.jp
date Thu, 12 Feb 2009 16:31:38 +0900
parents 5cde66c926b4
children 25c820b6060e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_VIEWER
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_VIEWER
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #include <SDL.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 #ifndef INCLUDED_VIEWER_TYPES
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 # include "viewer_types.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 class Viewer {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 public:
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 Viewer(int bpp, int width, int height, int spenum);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 virtual ~Viewer(void) {}
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 /* screen info */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 int width;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 int height;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 int bpp;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 int spe_num;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 int rgb_size[3];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 Uint32 video_flags;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 Uint32 *pixels;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27 virtual void video_init(void) = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28 void init();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30 int get_ticks();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 bool quit_check();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 void quit();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 virtual void swap_buffers();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 virtual void clean_pixels() {}
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 144
diff changeset
37 virtual void run_init(const char *xml, int sg_number);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 virtual void run_loop(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 virtual void run_draw(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 virtual void run_finish(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK