Mercurial > hg > Game > Cerium
view Renderer/Test/print_string.cc @ 1479:163220e54cc0 draft
remove hard code for TaskLog
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 24 Jul 2012 17:15:15 +0900 |
parents | b8adf4e95e96 |
children |
line wrap: on
line source
#include <math.h> #include <stdlib.h> #include <string.h> #include "SceneGraphRoot.h" #include "MainLoop.h" #include "print_string.h" MainLoopPtr print_string::init(Viewer *sgroot, int screen_w, int screen_h) { SceneGraphPtr root; //SceneGraphPtr test[10]; char *print_message = "aあ区"; SceneGraphPtr light = sgroot->getLight(0); sgroot->OnLightSwitch(0); light->xyz[0] = screen_w / 2; light->xyz[1] = screen_h / 2; light->xyz[2] = -100; root = sgroot->createSceneGraph(); //display_string(sgroot,root,print_message,80,screen_w,screen_h,0x00ff00ff); sgroot->createStringFont(root,print_message,80,700,300,0x00ff00ff); sgroot->setSceneData(root); return sgroot; } extern Application * application() { return new print_string(); } const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; extern int 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 init(manager, argc, argv); } void TMend(TaskManager *manager) { printf("test_nogl end\n"); } /* end */