annotate Renderer/Test/viewer.cc @ 1276:e92f00ed2fc0 draft

apply view matrix to normal vector
author Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Nov 2011 19:26:18 +0900
parents 5ffe41af8d3b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <math.h>
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <stdlib.h>
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "SceneGraphRoot.h"
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "MainLoop.h"
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #include "viewer.h"
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // prototype
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
9 static void object_move_rotation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
10 static void object_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree);
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
11 static void object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
13 int light_sysswitch = 1;
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
14 int light_num = 4;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
15
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
16 void LightSysSwitch(Viewer *sgroot) {
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
17 if (light_sysswitch == 1) {
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
18 sgroot->OnLightSysSwitch();
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
19 } else if (light_sysswitch == 0) {
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
20 sgroot->OffLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
21 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
22 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
23
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
25
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
26
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 static void
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
28 object_move_rotation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 {
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 589
diff changeset
30 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 Pad *pad = sgroot->getController();
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
32 if (pad->circle.isPush()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
33 node->set_move_collision(object_move_translation, object_collision);
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
34 }
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
35 if (pad->left.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
36 node->angle[1] += 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
37 } else if (pad->right.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
38 node->angle[1] -= 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
39 }
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
40 if (pad->up.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
41 node->angle[0] += 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
42 } else if (pad->down.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
43 node->angle[0] -= 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
44 }
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 static void
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
50 object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 {
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 589
diff changeset
52 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 Pad *pad = sgroot->getController();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 if (pad->circle.isPush()) {
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
56 node->set_move_collision(object_move_rotation, object_collision);
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
59 if (pad->left.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
60 node->xyz[0] -= 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
61 } else if (pad->right.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
62 node->xyz[0] += 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
63 }
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
64 if (pad->up.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
65 node->xyz[1] -= 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
66 } else if (pad->down.isHold()) {
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
67 node->xyz[1] += 10;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
68 }
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
70
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 static void
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
75 object_collision(SceneGraphPtr node, void *sgroot_, int screen_w,
653
7a311860a76e remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 589
diff changeset
76 int screen_h, SceneGraphPtr tree)
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 char *xmlfile;
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 #define MAX_ROOT 100
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 char *parts[MAX_ROOT ];
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 int parts_cnt;
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 MainLoopPtr
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 viewer::init(Viewer *sgroot, int screen_w, int screen_h)
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 {
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
89
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
90 LightSysSwitch(sgroot);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
91
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
92 SceneGraphPtr object;
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
94 for (int i = 0; i < light_num; i++) {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
95 SceneGraphPtr light = sgroot->getLight(i);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
96 sgroot->OnLightSwitch(i);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
97 light->xyz[0] = screen_w / 2;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
98 light->xyz[1] = screen_h / 2;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
99 light->xyz[2] = -100;
1276
e92f00ed2fc0 apply view matrix to normal vector
Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 827
diff changeset
100
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
101 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
102
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
103
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 // 固定した値で srandom すると、毎回同じ、random() 列が生成される
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 // random な値が欲しいなら、man random に方法が書いてあります。
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 srandom(100);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 sgroot->createFromXMLfile(xmlfile);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
110 object = sgroot->createSceneGraph();
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
111 object->set_move_collision(object_move_rotation, object_collision);
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
113 object->xyz[0] = screen_w/2;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
114 object->xyz[1] = screen_h/2;;
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
115 object->xyz[2] = 30.0f;
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 for(int i=0;i<parts_cnt; i++) {
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
118 object->addChild(sgroot->createSceneGraph(parts[i]));
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 }
795
abbf28a8ca42 add xmlfile
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 793
diff changeset
120 sgroot->setSceneData(object);
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 return sgroot;
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 extern Application *
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 application() {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 return new viewer();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n";
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 extern int init(TaskManager *manager, int argc, char *argv[]);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 extern void task_initialize();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 static void TMend(TaskManager *manager);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 int
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 TMmain(TaskManager *manager, int argc, char *argv[])
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 task_initialize();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 manager->set_TMend(TMend);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
142
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 for(int i=0;i<argc;i++) {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 if (strcmp(argv[i],"-sg") == 0 && i+1<=argc) {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 xmlfile = argv[i+1];
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 } else if (strcmp(argv[i],"-name") == 0 && i+1<=argc) {
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
147 parts[parts_cnt++] = argv[i+1];
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
148 } else if (strcmp(argv[i],"-lightsys") == 0 && i+1<=argc) {
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
149 if (strcmp(argv[i],"on") == 0) {
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
150 light_sysswitch = 1;
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
151 } else if (strcmp(argv[i],"off") == 0) {
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
152 light_sysswitch = 0;
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
153 }
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
154 } else if (strcmp(argv[i],"-lightnum") == 0 && i+1<=argc) {
827
5ffe41af8d3b viewer lightsysswitch fix
yutaka@localhost.localdomain
parents: 826
diff changeset
155 light_num = atoi(argv[i+1]);
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 735
diff changeset
156 }
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 return init(manager, argc, argv);
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 void
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 TMend(TaskManager *manager)
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 printf("test_nogl end\n");
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 /* end */
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169