[Plib-cvs] plib/src/ssg ssgLoadMDL.cxx,1.46,1.47
Brought to you by:
sjbaker
From: Wolfram K. <wol...@us...> - 2003-12-06 18:18:23
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv19152 Modified Files: ssgLoadMDL.cxx Log Message: LoDs (Level of Details) implemented. Different LoDs are put into different hierarchy nodes and named according to their detail level Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- ssgLoadMDL.cxx 5 Dec 2003 18:14:01 -0000 1.46 +++ ssgLoadMDL.cxx 6 Dec 2003 18:18:20 -0000 1.47 @@ -86,9 +86,12 @@ #endif // File Address Stack -static const int MAX_STACK_DEPTH = 64; // wk: 32 is too small -static long stack_ [MAX_STACK_DEPTH]; +static const int MAX_STACK_DEPTH = 128; // wk: 32 is too small +static long stack_ [MAX_STACK_DEPTH]; // adress part +static short lod_ [MAX_STACK_DEPTH]; // lod part of the stack static int stack_depth_; +static short noLoDs; +static short curr_lod; [...123 lines suppressed...] @@ -1339,7 +1360,10 @@ NULL, curr_index_); curr_part_->setState( createState(false) ); - + char sName[10]; + sprintf(sName, "lod %d", (int)curr_lod); + curr_part_->setName(sName); + //assert(curr_part_->getState()->getTexture() == NULL); unsigned short numverts = ulEndianReadLittle16(fp); @@ -1584,6 +1608,7 @@ delete curr_norm_; DEBUGPRINT("\n" << vertex_array_->getNum() << " vertices\n"); + printf("NoLoDs = %d\n", (int)noLoDs); return model_; } |