diff Renderer/Engine/SceneGraph.cc @ 908:a4ed11e66fbf draft

fix
author Yutaka_Kinjyo
date Tue, 20 Jul 2010 04:05:07 +0900
parents becd6fad3ae0
children e9a64c42e5d0
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraph.cc	Tue Jul 20 02:33:48 2010 +0900
+++ b/Renderer/Engine/SceneGraph.cc	Tue Jul 20 04:05:07 2010 +0900
@@ -117,6 +117,7 @@
  */
 SceneGraph::SceneGraph(SceneGraphPtr orig)
 {
+
     init();
     memcpy(this, orig, sizeof(SceneGraph));
 
@@ -150,12 +151,19 @@
     //texture_info = (texture_list_ptr)manager->allocate(sizeof(texture_list));
     //data = new float[size*3*3];
 
-#if SPE_CREATE_POLYGON
-    
-    coord_pack_size = sizeof(float)*8*size*3;
-    coord_pack = (flaat*)manager->allocate(coord_pack_size);
-    
-#else 
+    for (int i = 0; i < 16; i++) {
+      matrix[i] = 0;
+      real_matrix[i] = 0;
+    }
+
+#if SPE_CREATE_POLYGON_CHECK
+
+    for (int i = 0; i < 16; i++) {
+      printf("%f\n",matrix[i]);
+      printf("r %f\n",real_matrix[i]);
+    }
+
+#endif
 
     coord_xyz = (float*)manager->allocate(sizeof(float)*size*3);
     coord_tex = (float*)manager->allocate(sizeof(float)*size*3);
@@ -164,11 +172,6 @@
     coord_pack_size = sizeof(float)*8*size*3;     // coord_pack_vertex size is 32byte. vertex num 3.
     coord_pack = (float*)manager->allocate(coord_pack_size);
 
-    int sg_matrix_size = 32; // matrix 16 + real_matrix 32.
-    sg_matrix = (float*)manager->allocate(sg_matrix_size);
-
-#endif
-
     get_data(manager, surface->children);
 
     finalize = &SceneGraph::finalize_original;
@@ -195,7 +198,7 @@
 
     size = 0;
     //data = NULL;
-
+  
 #if SPE_CREATE_POLYGON
 
     //tri_pack = NULL;