- Timestamp:
- 06/28/08 16:20:34 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.cpp
r2802 r2803 9 9 using namespace std; 10 10 11 // sort by alpha, in second instance per texture12 //#define SORT_ALPHA13 11 14 12 namespace CHCDemoEngine … … 174 172 int tsize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 175 173 float dist = SqrMagnitude(ent->GetBoundingBox().Center() - mCamera->GetPosition()); 176 Debug << "e: " << ent << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << en t->GetBoundingBox() << " g: " << ent->GetGeometry() << " t: " << ent->GetTransformation() << " m: " << ent->GetMaterial() << endl;174 Debug << "e: " << ent << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << endl; 177 175 } 178 176 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2802 r2803 105 105 bool flyMode = true; 106 106 bool depthPass = false; 107 107 bool useGlFinish = false; 108 108 109 109 SceneEntityContainer skyGeometry; … … 308 308 "'F6', - shows/hides parameters", 309 309 "'F7', - depth pass", 310 "'F8', - enable/disable glFinish for more accurate timings", 310 311 "'SPACE' - cycles through occlusion culling algorithms", 311 312 "", … … 516 517 if (!flyMode) PlaceViewer(oldPos); 517 518 518 // note: have to flush queue in order to get reliable timings 519 // for optimal performance, remove this 520 //glFinish(); 519 if (useGlFinish) glFinish(); 521 520 522 521 algTimer.Start(); … … 571 570 glDisableClientState(GL_NORMAL_ARRAY); 572 571 573 574 575 // note: have to flush queue in order to get reliable timings 576 // for optimal performance, remove this 577 //glFinish(); 572 if (useGlFinish) glFinish(); 573 578 574 algTime = algTimer.Elapsedms(); 579 575 … … 774 770 traverser->SetUseDepthPass(depthPass); 775 771 break; 772 case GLUT_KEY_F8: 773 useGlFinish = !useGlFinish; 774 break; 776 775 case GLUT_KEY_LEFT: 777 776 { … … 1094 1093 1095 1094 // if some strange render time spike happened in this frame => don't count 1096 //if (algTime < 1000) renderTime = algTime * expFactor + (1.0f - expFactor) * algTime; 1097 1098 renderTime = 1e3f * (elapsedTime * expFactor + (1.0f - expFactor) * elapsedTime); 1095 if (algTime < 1000) renderTime = algTime * expFactor + (1.0f - expFactor) * algTime; 1096 //renderTime = 1e3f * (elapsedTime * expFactor + (1.0f - expFactor) * elapsedTime); 1099 1097 1100 1098 accumulatedTime += elapsedTime * 1e3f; … … 1120 1118 assumedVisibleFrames, maxBatchSize); 1121 1119 1122 sprintf(msg3, " render queue: %d, depth pass: %d, multiqueries: %d, tight bounds: %d",1123 use RenderQueue, depthPass, useMultiQueries, useTightBounds);1120 sprintf(msg3, "multiqueries: %d, tight bounds: %d, render queue: %d, depth pass: %d, glFinish: %d", 1121 useMultiQueries, useTightBounds, useRenderQueue, depthPass, useGlFinish); 1124 1122 1125 1123 string str;
Note: See TracChangeset
for help on using the changeset viewer.