Changeset 2803 for GTP/trunk


Ignore:
Timestamp:
06/28/08 16:20:34 (17 years ago)
Author:
mattausch
Message:
 
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  
    99using namespace std; 
    1010 
    11 // sort by alpha, in second instance per texture 
    12 //#define SORT_ALPHA 
    1311 
    1412namespace CHCDemoEngine 
     
    174172                        int tsize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 
    175173                        float dist = SqrMagnitude(ent->GetBoundingBox().Center() - mCamera->GetPosition()); 
    176                         Debug << "e: " << ent << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << ent->GetBoundingBox() << " g: " << ent->GetGeometry() << " t: " << ent->GetTransformation() << " m: " << ent->GetMaterial() << endl; 
     174                        Debug << "e: " << ent << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << endl; 
    177175                } 
    178176        } 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2802 r2803  
    105105bool flyMode = true; 
    106106bool depthPass = false; 
    107  
     107bool useGlFinish = false; 
    108108 
    109109SceneEntityContainer skyGeometry; 
     
    308308                "'F6',          - shows/hides parameters", 
    309309                "'F7',          - depth pass", 
     310                "'F8',          - enable/disable glFinish for more accurate timings", 
    310311                "'SPACE'        - cycles through occlusion culling algorithms", 
    311312                "", 
     
    516517        if (!flyMode) PlaceViewer(oldPos); 
    517518 
    518         // note: have to flush queue in order to get reliable timings 
    519         // for optimal performance, remove this 
    520         //glFinish(); 
     519        if (useGlFinish) glFinish(); 
    521520 
    522521        algTimer.Start(); 
     
    571570        glDisableClientState(GL_NORMAL_ARRAY); 
    572571 
    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 
    578574        algTime = algTimer.Elapsedms(); 
    579575 
     
    774770                traverser->SetUseDepthPass(depthPass); 
    775771                break; 
     772        case GLUT_KEY_F8: 
     773                useGlFinish = !useGlFinish; 
     774                break; 
    776775        case GLUT_KEY_LEFT: 
    777776                { 
     
    10941093 
    10951094        // 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); 
    10991097 
    11001098        accumulatedTime += elapsedTime * 1e3f; 
     
    11201118                      assumedVisibleFrames, maxBatchSize); 
    11211119 
    1122         sprintf(msg3, "render queue: %d, depth pass: %d, multiqueries: %d, tight bounds: %d",  
    1123                       useRenderQueue, 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); 
    11241122 
    11251123        string str; 
Note: See TracChangeset for help on using the changeset viewer.