Ignore:
Timestamp:
06/18/08 20:42:06 (16 years ago)
Author:
mattausch
Message:

implemented multiqueries, but still buggy version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp

    r2771 r2773  
    6262 
    6363int renderedObjects = 0; 
     64int renderedNodes = 0; 
     65int renderedTriangles = 0; 
     66 
    6467int issuedQueries = 0; 
    6568int traversedNodes = 0; 
     
    869872 
    870873                renderedObjects = traverser->GetStats().mNumRenderedGeometry; 
     874                renderedNodes = traverser->GetStats().mNumRenderedNodes; 
     875                renderedTriangles = traverser->GetStats().mNumRenderedTriangles; 
     876 
    871877                traversedNodes = traverser->GetStats().mNumTraversedNodes; 
    872878                frustumCulledNodes = traverser->GetStats().mNumFrustumCulledNodes; 
     
    881887        string str2; 
    882888 
    883         int dummy = 0; 
    884         CalcDecimalPoint(str, dummy); 
    885         CalcDecimalPoint(str2, traverser->GetStats().mNumRenderedTriangles); 
    886  
    887         sprintf_s(msg3, "rendered objects: %6d (of %6d), rendered triangles: %s (of %s)",  
    888                           renderedObjects, sceneEntities.size(), str.c_str(), str2.c_str());  
    889  
    890         sprintf_s(msg4, "nodes: %5d, traversed: %5d, frustum culled: %5d, query culled: %5d, issued queries: %5d, state changes: %5d", 
    891                           bvh->GetNumVirtualNodes(), traversedNodes, frustumCulledNodes, 
    892                           queryCulledNodes, issuedQueries, stateChanges); 
     889        CalcDecimalPoint(str, renderedTriangles); 
     890        CalcDecimalPoint(str2, bvh->GetBvhStats().mTriangles); 
     891 
     892        sprintf_s(msg3, "rendered nodes: %6d (of %6d), rendered triangles: %s (of %s)",  
     893                          renderedNodes, bvh->GetNumVirtualNodes(), str.c_str(), str2.c_str());  
     894 
     895        sprintf_s(msg4, "traversed: %5d, frustum culled: %5d, query culled: %5d, issued queries: %5d, state changes: %5d", 
     896                          traversedNodes, frustumCulledNodes, queryCulledNodes, issuedQueries, stateChanges); 
    893897 
    894898        sprintf_s(msg5, "fps: %6.1f", fps); 
    895899 
    896         cout << "previously visible node queries: " << traverser->GetStats().mNumPreviouslyVisibleNodeQueries << endl; 
     900        //cout << "previously visible node queries: " << traverser->GetStats().mNumPreviouslyVisibleNodeQueries << endl; 
    897901 
    898902        begin2D(); 
     
    906910                glColor3f(1.0f, 1.0f, 1.0f); 
    907911                 
    908                 Output(800, 30, msg[renderMode]); 
     912                Output(850, 30, msg[renderMode]); 
    909913 
    910914                if(showStatistics) 
Note: See TracChangeset for help on using the changeset viewer.