Mercurial > hg > Members > kono > Cerium
changeset 861:000a8b63ad9a
Still on the way
author | yutaka@localhost.localdomain |
---|---|
date | Fri, 18 Jun 2010 16:07:12 +0900 |
parents | 649e4cb84683 |
children | d3899a44f314 |
files | Renderer/Engine/Camera.cc Renderer/Engine/Makefile.def Renderer/Engine/SceneGraph.cc Renderer/Engine/polygon.cc Renderer/Engine/spe/task_texture.h Renderer/Engine/spe/texture.h Renderer/Engine/task/task_texture.h Renderer/Engine/task/texture.h Renderer/Engine/viewer.cc |
diffstat | 9 files changed, 44 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/Camera.cc Fri Jun 18 01:30:06 2010 +0900 +++ b/Renderer/Engine/Camera.cc Fri Jun 18 16:07:12 2010 +0900 @@ -146,6 +146,14 @@ this->set_move_collision(camera_move, camera_collision, (void *)sgroot); +#if SPE_CREATE_POLYGON + + sg_matrix = (float*)malloc(sizeof(float)*32); + matrix = sg_matrix; + real_matrix = sg_matrix + 16; + +#endif + for(int i = 0; i < 16; i++) { real_matrix[i] = 0; if (i % 5 == 0) { @@ -153,7 +161,6 @@ } } - } Camera::~Camera(void)
--- a/Renderer/Engine/Makefile.def Fri Jun 18 01:30:06 2010 +0900 +++ b/Renderer/Engine/Makefile.def Fri Jun 18 16:07:12 2010 +0900 @@ -5,7 +5,7 @@ ABIBIT = 32 ABI = -m$(ABIBIT) CC = g++ -OPT = -g -DSPE_CREATE_POLYGON #-O2 +OPT = -g #-DSPE_CREATE_POLYGON #-O2 CFLAGS = -g -Wall $(ABI) $(OPT) # -DDEBUG INCLUDE = -I$(CERIUM)/include/TaskManager -I.
--- a/Renderer/Engine/SceneGraph.cc Fri Jun 18 01:30:06 2010 +0900 +++ b/Renderer/Engine/SceneGraph.cc Fri Jun 18 16:07:12 2010 +0900 @@ -101,6 +101,14 @@ init(); finalize = &SceneGraph::finalize_copy; +#if SPE_CREATE_POLYGON + + sg_matrix = (float*)malloc(sizeof(float)*32); + matrix = sg_matrix; + real_matrix = sg_matrix + 16; + +#endif + this->name = "NULLPO"; } @@ -139,7 +147,7 @@ size = atoi((char *)xmlGetProp(surface,(xmlChar *)"size")); name = (char *)xmlGetProp(surface,(xmlChar *)"name"); parent_name = (char *)xmlGetProp(surface,(xmlChar *)"parent"); - texture_info = (texture_list_ptr)manager->allocate(sizeof(texture_list)*TABLE_SIZE); + //texture_info = (texture_list_ptr)manager->allocate(sizeof(texture_list)); //data = new float[size*3*3]; #if SPE_CREATE_POLYGON @@ -200,11 +208,11 @@ #if SPE_CREATE_POLYGON - tri_pack = NULL; - sg_matrix = NULL; - matrix = NULL; - real_matrix = NULL; - texture_info = NULL; + //tri_pack = NULL; + //sg_matrix = NULL; + //matrix = NULL; + //real_matrix = NULL; + //texture_info = NULL; #else @@ -244,8 +252,8 @@ free(tri_pack); free(sg_matrix); - free(matrix); - free(real_matrix); + //free(matrix); + //free(real_matrix); free(texture_info); #else
--- a/Renderer/Engine/polygon.cc Fri Jun 18 01:30:06 2010 +0900 +++ b/Renderer/Engine/polygon.cc Fri Jun 18 16:07:12 2010 +0900 @@ -33,9 +33,15 @@ angle[2] = 0; angle[3] = 1; + +#if !SPE_CREATE_POLYGON + for (int i = 0; i < 16; i++) { matrix[i] = 0; } + +#endif + } void @@ -54,9 +60,15 @@ angle[2] = 0; angle[3] = 1; + +#if !SPE_CREATE_POLYGON + for (int i = 0; i < 16; i++) { matrix[i] = 0; } + +#endif + } #if 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/spe/task_texture.h Fri Jun 18 16:07:12 2010 +0900 @@ -0,0 +1,2 @@ +#define MAX_LOAD_SIZE 16384 +#define TEXTURE_ID 13
--- a/Renderer/Engine/spe/texture.h Fri Jun 18 01:30:06 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -#define MAX_LOAD_SIZE 16384 -#define TEXTURE_ID 13
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/task/task_texture.h Fri Jun 18 16:07:12 2010 +0900 @@ -0,0 +1,2 @@ +#define MAX_LOAD_SIZE 16384 +#define TEXTURE_ID 13
--- a/Renderer/Engine/task/texture.h Fri Jun 18 01:30:06 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -#define MAX_LOAD_SIZE 16384 -#define TEXTURE_ID 13
--- a/Renderer/Engine/viewer.cc Fri Jun 18 01:30:06 2010 +0900 +++ b/Renderer/Engine/viewer.cc Fri Jun 18 16:07:12 2010 +0900 @@ -436,6 +436,8 @@ frames++; } +#if SPE_CREATE_POLYGON + void Viewer::create_pp_task(SceneGraphPtr sg, PolygonPackPtr pp_cur, HTaskPtr create_pp_wait, int &pp_index, int &sg_index, int tri_num) @@ -455,6 +457,7 @@ sg_index += tri_num; } +#endif void Viewer::common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot)