0
|
1 int
|
|
2 main()
|
|
3 {
|
|
4 CubeSceneGraph scg[2];
|
|
5 TaskID wait = 0;
|
|
6 TaskID wait2 = 0;
|
|
7 int phase = 0;
|
|
8
|
|
9 scg[0] = new CubeSceneGraph("cube.xml");
|
|
10 scg[1] = scg[0]->copy();
|
|
11
|
|
12 // OPENGL, SHARED, DATAPACK, CELL
|
|
13 RenderingEngine *engine = RenderingEngineFactory(OPENGL);
|
|
14 engine->init(width, height, bpp);
|
|
15
|
|
16 while (1) {
|
|
17 wait = engine->update_all(scg[1-phase], scg[phase], wait);
|
|
18 //scg[1-phase]->update_all(scg[phase]);
|
|
19 wait2 = engine->draw_all(scg[phase], wait2);
|
|
20 //scg[phase]->draw_all(engine);
|
|
21 phase ^= 1;
|
|
22 }
|
|
23 }
|