Changeset 1781 for GTP/trunk/App/Demos
- Timestamp:
- 11/22/06 13:24:09 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Geom/Demo_LodStrips
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Geom/Demo_LodStrips/main.cpp
r1775 r1781 52 52 char ShadOFF[] ="(F2) Shadows OFF"; 53 53 54 int degAA=0, degABAB=0;55 56 54 char HelpString[]="(F1) Quit Help\n" 57 55 "This demo shows an example of the LODStrips model in action. The models in the scene\n" … … 97 95 } 98 96 virtual void End(){ 99 int v0, v1, v2, v3;100 unsigned int i;101 102 v0 = pIdx[0];103 v1 = pIdx[1];104 for ( i=2; i < mRenderOp.indexData->indexCount; i++)105 {106 if ( v0 == v1 ) degAA++;107 v0 = v1;108 v1 = pIdx[i];109 }110 111 v0 = pIdx[0];112 v1 = pIdx[1];113 v2 = pIdx[2];114 v3 = pIdx[3];115 for ( i=4; i < mRenderOp.indexData->indexCount; i++)116 {117 if ( ( v0 == v2 ) && ( v1 == v3 ) )118 {119 v0 = v2;120 v1 = v3;121 v2 = pIdx[i];122 if ( i < mRenderOp.indexData->indexCount )123 {124 i++;125 v3 = pIdx[i];126 }127 else v3 = -1;128 129 degABAB++;130 }131 else132 {133 v0 = v1;134 v1 = v2;135 v2 = v3;136 v3 = pIdx[i];137 }138 }139 140 97 ibuf->unlock(); 141 98 } … … 236 193 (lodfactorBefore<1.0f && lodfactor==1.0f)) 237 194 { 238 degAA=0; degABAB=0;239 195 myStrips->GoToLod(lodfactor); 240 196 lodfactorBefore=lodfactor; … … 338 294 const RenderTarget::FrameStats& stats = mWindow->getStatistics(); 339 295 340 sprintf(cadena,"\nDistance: %d\nLOD factor: %f\nTriangle Count: %d\n Degenerated AA: %d\nDegenerated ABAB: %d"341 , distance, lodfactor,stats.triangleCount , degAA*num_ogres, degABAB*num_ogres);296 sprintf(cadena,"\nDistance: %d\nLOD factor: %f\nTriangle Count: %d\n" 297 , distance, lodfactor,stats.triangleCount); 342 298 mInfo->setCaption(cadena); 343 299 sprintf(cadena,"Current FPS: %f\n",stats.lastFPS); 344 300 mInfo2->setCaption(cadena); 345 346 //sprintf(cadena,"LOD factor: %f",lodfactor);347 348 //mInfo2->setCaption(cadena);349 301 350 302 mCamera->yaw(mRotX);
Note: See TracChangeset
for help on using the changeset viewer.