comparison Renderer/Engine/SgChange.h @ 748:b7376415fa5f

TaskManager changeset 683, Renderer changeset 746
author hiroki
date Mon, 25 Jan 2010 18:01:19 +0900
parents d0b8860c17f8
children 5d23ffea34e3
comparison
equal deleted inserted replaced
677:fd3492a767c7 748:b7376415fa5f
7 #include "TaskManager.h" 7 #include "TaskManager.h"
8 #include "KeyStat.h" 8 #include "KeyStat.h"
9 #include "MainLoop.h" 9 #include "MainLoop.h"
10 #include "Application.h" 10 #include "Application.h"
11 #include "SceneGraphRoot.h" 11 #include "SceneGraphRoot.h"
12 #include "viewer.h"
12 13
13 class SceneGraphRoot; 14 class SceneGraphRoot;
14
15 class Application; 15 class Application;
16 16
17 class SgChange : public MainLoop { 17 class SgChange : public MainLoop {
18 18
19 public: 19 public:
20 20
21 SgChange(int bpp, int width, int height, int spenum); 21 Viewer *viewer;
22 TaskManager *manager;
23
24 SgChange(Viewer *v) {
25 viewer = v;
26 manager = v->manager;
27 }
22 28
23 virtual ~SgChange() {} 29 virtual ~SgChange() {}
24 30
25 Application *app;
26
27 TaskManager *manager;
28 key_stat *keyPtr;
29 HTaskPtr draw_dummy;
30 31
31 SceneGraphRoot *sgroot_A; 32 SceneGraphRoot *sgroot_A;
32 SceneGraphRoot *sgroot_B; 33 SceneGraphRoot *sgroot_B;
33 34
34 /* screen info */ 35 HTaskPtr draw_finish;
35 int width;
36 int height;
37 int bpp;
38 36
39 int spe_num; 37 void run_init();
38 void run_loop(HTaskPtr task_next);
39 void run_move(HTaskPtr task_next);
40 void run_draw(HTaskPtr task_next);
41 void rendering(HTaskPtr task_next);
42 HTaskPtr initLoop();
40 43
41 int rgb_size[3];
42 Uint32 video_flags;
43 Uint32 *pixels;
44
45 void init();
46
47 int get_ticks();
48 bool quit_check();
49 void quit();
50
51 virtual void swap_buffers();
52 virtual void clean_pixels() {}
53
54 virtual void run_init(TaskManager *manager, Application *app);
55 virtual void run_loop(HTaskPtr task_next);
56 virtual void run_finish();
57 virtual void exchange_sgroot(); 44 virtual void exchange_sgroot();
58 void mainLoop(); 45 void mainLoop();
59 46
60 void createFromXMLfile(const char *file) 47 void createFromXMLfile(const char *file)
61 { 48 {
89 76
90 int getLast() 77 int getLast()
91 { 78 {
92 return sgroot_A->getLast(); 79 return sgroot_A->getLast();
93 } 80 }
94
95
96
97
98 private:
99 HTaskPtr initLoop();
100 }; 81 };
101
102 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK
103
104 82
105 #endif 83 #endif
106 84