changeset 693:fc0227b5cb5a

debug , aligned light_xyz
author hiroki@localhost.localdomain
date Tue, 08 Dec 2009 19:44:20 +0900
parents 50750b118116
children be44ada665e9 0d8d2b7a3438
files Renderer/Engine/Makefile.def Renderer/Engine/SgChange.cc Renderer/Engine/SgChange.h Renderer/Engine/spe/Makefile Renderer/Test/SgRootChange.cc TaskManager/Makefile.def
diffstat 6 files changed, 26 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/Makefile.def	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Engine/Makefile.def	Tue Dec 08 19:44:20 2009 +0900
@@ -5,7 +5,8 @@
 ABIBIT = 32 
 ABI = -m$(ABIBIT)
 CC      = g++
-CFLAGS  = -g -Wall $(ABI) # -O9 -DDEBUG
+OPT	= -g
+CFLAGS  = -g -Wall $(ABI) $(OPT) # -O9 -DDEBUG
 
 INCLUDE = -I$(CERIUM)/include/TaskManager -I.
 # LIBS = -L$(CERIUM)/TaskManager -m$(ABIBIT)
--- a/Renderer/Engine/SgChange.cc	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Engine/SgChange.cc	Tue Dec 08 19:44:20 2009 +0900
@@ -120,7 +120,7 @@
 {
     HTaskPtr task_next;
     HTaskPtr task_tex;
-    
+ 
     sgpack = (SceneGraphPack*)manager->allocate(sizeof(SceneGraphPack));
     sgpack->init();
     ppack  = (PolygonPack*)manager->allocate(sizeof(PolygonPack));
@@ -206,10 +206,10 @@
     light_xyz_stock = sgroot_A->getLightVector();
 
     //printf("Sgroot = %x\n", sgroot_A);
-    /*
-    task_next->set_post(&post2runLoop, (void *)this, 0);
-    task_next->spawn();
-    */
+    
+    //task_next->set_post(&post2runLoop, (void *)this, 0);
+    //task_next->spawn();
+    
     rendering(task_next);
 }
 
--- a/Renderer/Engine/SgChange.h	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Engine/SgChange.h	Tue Dec 08 19:44:20 2009 +0900
@@ -38,7 +38,7 @@
 
     int spe_num;
 
-    float light_xyz[4];
+    float light_xyz[4] __attribute__((aligned(16)));
     float *light_xyz_stock;
 
     int rgb_size[3];
--- a/Renderer/Engine/spe/Makefile	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Engine/spe/Makefile	Tue Dec 08 19:44:20 2009 +0900
@@ -10,7 +10,7 @@
 OBJS = $(SRCS:.cc=.o)
 
 CC      = spu-g++
-CFLAGS  = -O9 -Wall -g -fno-exceptions -fno-rtti #-DDEBUG
+CFLAGS  = -Wall -g -fno-exceptions -fno-rtti #-DDEBUG
 INCLUDE = -I$(TOP)/include/TaskManager -I. -I..
 LIBS    = -L$(TOP)/TaskManager -lspemanager
 
@@ -22,7 +22,7 @@
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
-	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
+	$(CC) $(OPT) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
 
 clean:
 	rm -f $(TARGET) $(OBJS)
--- a/Renderer/Test/SgRootChange.cc	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Test/SgRootChange.cc	Tue Dec 08 19:44:20 2009 +0900
@@ -4,6 +4,19 @@
 #include "MainLoop.h"
 #include "SgRootChange.h"
 
+static void
+ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
+{
+    printf("test\n");
+}
+
+static void
+ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
+			   SceneGraphPtr tree)
+{
+    printf("collision\n");
+}
+
 // prototype
 MainLoopPtr 
 SgRootChange::init(Viewer *sgroot, int screen_w, int screen_h)
@@ -17,6 +30,7 @@
     SceneGraphPtr ball;
     sgroot->createFromXMLfile("xml_file/Ball.xml");
     ball = sgroot->createSceneGraph("Ball");
+    ball->set_move_collision(ball_move, ball_collision);
     sgroot->setSceneData(ball);
 
     return sgroot;
--- a/TaskManager/Makefile.def	Tue Dec 08 16:52:04 2009 +0900
+++ b/TaskManager/Makefile.def	Tue Dec 08 19:44:20 2009 +0900
@@ -32,8 +32,8 @@
 # SIMPLE_TASK=-DSIMPLE_TASK
 SIMPLE_TASK=
 
-OPT = -O9 
-# OPT =  -g
+#OPT = -O9 
+OPT =  -g
 
 CC     = g++   
 CFLAGS = $(SIMPLE_TASK) -Wall `sdl-config --cflags` -m$(ABIBIT)   $(OPT)