Changeset 306

Show
Ignore:
Timestamp:
10/17/06 11:40:45 (2 years ago)
Author:
dshipton
Message:

Spot for not waiting on query…
Also don't automatically render everything above %10 of the screen…

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGOcclusionCullingTreeBuilder.cpp

    r304 r306  
    367367            //make decision 
    368368            //if(0 > 1) 
    369             if(cbb > scr_percent || cbb > 0.01
     369            if(cbb > scr_percent
    370370            { 
    371371                drawNode(pNode, denv, part); 
     
    548548            //    std::cout << std::endl << "Waiting on " << pNode->getResultNum() << "th query"; 
    549549            //}  
    550             while (!available) 
     550            GLuint sampleCount = 100;  //XXX: Set to what it should be from calc above. 
     551            if(available) 
    551552            { 
    552553                //std::cout << "."; 
    553                 getquiv(_testSamples[pNode->getResultNum()], GL_QUERY_RESULT_AVAILABLE_ARB, &available); 
     554                //getquiv(_testSamples[pNode->getResultNum()], GL_QUERY_RESULT_AVAILABLE_ARB, &available); 
     555                getquiv(_testSamples[pNode->getResultNum()], GL_QUERY_RESULT_ARB, &sampleCount); 
    554556                //glGetQueryObjectivARB(queries[i], GL_QUERY_RESULT_AVAILABLE_ARB, &available); 
    555557                //if(available) 
     
    559561            } 
    560562             
    561             GLuint sampleCount = 0; 
    562             getquiv(_testSamples[pNode->getResultNum()], GL_QUERY_RESULT_ARB, &sampleCount); 
    563563            //glGetQueryObjectuivARB(queries[i], GL_QUERY_RESULT_ARB, &sampleCount); 
    564564            //std::cout << i << ":" << sampleCount << " "; 
     
    727727 
    728728 
    729 #elif 0 // Bucket sorting 
     729#elif 1 // Bucket sorting 
    730730 
    731731    int index = osgClamp(0, static_cast<int>(val * _nBuckets), _nBuckets - 1);