comparison Renderer/Engine/SceneGraph.cc @ 861:fda7b71c3cc6 draft

Still on the way
author yutaka@localhost.localdomain
date Fri, 18 Jun 2010 16:07:12 +0900
parents 63a08f3a468a
children a215927a9885
comparison
equal deleted inserted replaced
860:63a08f3a468a 861:fda7b71c3cc6
99 SceneGraph::SceneGraph() 99 SceneGraph::SceneGraph()
100 { 100 {
101 init(); 101 init();
102 finalize = &SceneGraph::finalize_copy; 102 finalize = &SceneGraph::finalize_copy;
103 103
104 #if SPE_CREATE_POLYGON
105
106 sg_matrix = (float*)malloc(sizeof(float)*32);
107 matrix = sg_matrix;
108 real_matrix = sg_matrix + 16;
109
110 #endif
111
104 this->name = "NULLPO"; 112 this->name = "NULLPO";
105 } 113 }
106 114
107 /** 115 /**
108 * orig のコピーとして SceneGraph を生成する 116 * orig のコピーとして SceneGraph を生成する
137 init(); 145 init();
138 146
139 size = atoi((char *)xmlGetProp(surface,(xmlChar *)"size")); 147 size = atoi((char *)xmlGetProp(surface,(xmlChar *)"size"));
140 name = (char *)xmlGetProp(surface,(xmlChar *)"name"); 148 name = (char *)xmlGetProp(surface,(xmlChar *)"name");
141 parent_name = (char *)xmlGetProp(surface,(xmlChar *)"parent"); 149 parent_name = (char *)xmlGetProp(surface,(xmlChar *)"parent");
142 texture_info = (texture_list_ptr)manager->allocate(sizeof(texture_list)*TABLE_SIZE); 150 //texture_info = (texture_list_ptr)manager->allocate(sizeof(texture_list));
143 //data = new float[size*3*3]; 151 //data = new float[size*3*3];
144 152
145 #if SPE_CREATE_POLYGON 153 #if SPE_CREATE_POLYGON
146 154
147 /* CreatePolygon を spe 側でやるために。 155 /* CreatePolygon を spe 側でやるために。
198 size = 0; 206 size = 0;
199 //data = NULL; 207 //data = NULL;
200 208
201 #if SPE_CREATE_POLYGON 209 #if SPE_CREATE_POLYGON
202 210
203 tri_pack = NULL; 211 //tri_pack = NULL;
204 sg_matrix = NULL; 212 //sg_matrix = NULL;
205 matrix = NULL; 213 //matrix = NULL;
206 real_matrix = NULL; 214 //real_matrix = NULL;
207 texture_info = NULL; 215 //texture_info = NULL;
208 216
209 #else 217 #else
210 218
211 coord_xyz = NULL; 219 coord_xyz = NULL;
212 normal = NULL; 220 normal = NULL;
242 250
243 #if SPE_CREATE_POLYGON 251 #if SPE_CREATE_POLYGON
244 252
245 free(tri_pack); 253 free(tri_pack);
246 free(sg_matrix); 254 free(sg_matrix);
247 free(matrix); 255 //free(matrix);
248 free(real_matrix); 256 //free(real_matrix);
249 free(texture_info); 257 free(texture_info);
250 258
251 #else 259 #else
252 260
253 free(coord_xyz); 261 free(coord_xyz);