view 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
line wrap: on
line source

int
main()
{
    CubeSceneGraph scg[2];
    TaskID wait = 0;
    TaskID wait2 = 0;
    int phase = 0;

    scg[0] = new CubeSceneGraph("cube.xml");
    scg[1] = scg[0]->copy();

    // OPENGL, SHARED, DATAPACK, CELL
    RenderingEngine *engine = RenderingEngineFactory(OPENGL);
    engine->init(width, height, bpp);

    while (1) {
	wait = engine->update_all(scg[1-phase], scg[phase], wait);
	//scg[1-phase]->update_all(scg[phase]);
	wait2 = engine->draw_all(scg[phase], wait2);
	//scg[phase]->draw_all(engine);
	phase ^= 1;
    }
}