annotate example/cube/main.cpp @ 161:1f4c3f3238e6 fullHD_omedetou

texture の座標がマイナスになったあと、それを 0 にし忘れてた
author gongo@localhost.localdomain
date Mon, 08 Dec 2008 16:37:02 +0900
parents df32980116bd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
df32980116bd Initial revision
gongo
parents:
diff changeset
1 int
df32980116bd Initial revision
gongo
parents:
diff changeset
2 main()
df32980116bd Initial revision
gongo
parents:
diff changeset
3 {
df32980116bd Initial revision
gongo
parents:
diff changeset
4 CubeSceneGraph scg[2];
df32980116bd Initial revision
gongo
parents:
diff changeset
5 TaskID wait = 0;
df32980116bd Initial revision
gongo
parents:
diff changeset
6 TaskID wait2 = 0;
df32980116bd Initial revision
gongo
parents:
diff changeset
7 int phase = 0;
df32980116bd Initial revision
gongo
parents:
diff changeset
8
df32980116bd Initial revision
gongo
parents:
diff changeset
9 scg[0] = new CubeSceneGraph("cube.xml");
df32980116bd Initial revision
gongo
parents:
diff changeset
10 scg[1] = scg[0]->copy();
df32980116bd Initial revision
gongo
parents:
diff changeset
11
df32980116bd Initial revision
gongo
parents:
diff changeset
12 // OPENGL, SHARED, DATAPACK, CELL
df32980116bd Initial revision
gongo
parents:
diff changeset
13 RenderingEngine *engine = RenderingEngineFactory(OPENGL);
df32980116bd Initial revision
gongo
parents:
diff changeset
14 engine->init(width, height, bpp);
df32980116bd Initial revision
gongo
parents:
diff changeset
15
df32980116bd Initial revision
gongo
parents:
diff changeset
16 while (1) {
df32980116bd Initial revision
gongo
parents:
diff changeset
17 wait = engine->update_all(scg[1-phase], scg[phase], wait);
df32980116bd Initial revision
gongo
parents:
diff changeset
18 //scg[1-phase]->update_all(scg[phase]);
df32980116bd Initial revision
gongo
parents:
diff changeset
19 wait2 = engine->draw_all(scg[phase], wait2);
df32980116bd Initial revision
gongo
parents:
diff changeset
20 //scg[phase]->draw_all(engine);
df32980116bd Initial revision
gongo
parents:
diff changeset
21 phase ^= 1;
df32980116bd Initial revision
gongo
parents:
diff changeset
22 }
df32980116bd Initial revision
gongo
parents:
diff changeset
23 }