Mercurial > hg > Game > Cerium
view Renderer/Test/SgRootChange.cc @ 674:07351a5a51c9 draft
fix many task example (sort).
Dummy task is now system supported.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Dec 2009 00:54:10 +0900 |
parents | 7a311860a76e |
children | 4f7512038ced 18d31d18a6b2 |
line wrap: on
line source
#include <math.h> #include <stdlib.h> #include "SceneGraphRoot.h" #include "MainLoop.h" #include "SgRootChange.h" // prototype MainLoopPtr SgRootChange::init(Viewer *sgroot, int screen_w, int screen_h) { return sgroot; } MainLoopPtr SgRootChange::init_only_sg(SgChange *sgroot, int screen_w, int screen_h) { SceneGraphPtr ball; SceneGraphPtr cube; SceneGraphRoot *sg_buff_A = sgroot->sgroot_A; SceneGraphRoot *sg_buff_B = sgroot->sgroot_B; sg_buff_A->createFromXMLfile(sgroot->manager, "xml_file/Ball.xml"); sg_buff_B->createFromXMLfile(sgroot->manager, "xml_file/cube.xml"); ball = sgroot->sgroot_A->createSceneGraph("Ball"); cube = sgroot->sgroot_B->createSceneGraph("Cube"); sgroot->sgroot_A->setSceneData(ball); sgroot->sgroot_B->setSceneData(cube); return sgroot; } extern Application * application() { return new SgRootChange(); } const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; extern int sg_init(TaskManager *manager, int argc, char *argv[]); extern void task_initialize(); static void TMend(TaskManager *manager); int TMmain(TaskManager *manager, int argc, char *argv[]) { task_initialize(); manager->set_TMend(TMend); return sg_init(manager, argc, argv); } void TMend(TaskManager *manager) { printf("test_nogl end\n"); } /* end */