Changeset 292

Show
Ignore:
Timestamp:
10/13/06 17:07:46 (2 years ago)
Author:
dshipton
Message:

User knobs visible in this.
y/h = ± Covered Probability Threshold
u/j = ± Minimum Small Feature Pixel Threshold
i/k = ± Visible Pixel Threshold for drawing(after a test came back)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk_RenderTraversalWork/Source/System/Statistics/Foregrounds/testStatisticsRender.cpp

    r142 r292  
    2727bool show = true; 
    2828bool bGLFinish = false; 
     29long e_time=0, timebase=0; 
     30int frames; 
     31 
     32long get_milli_time (void) 
     33{ 
     34    struct timeval tv; 
     35    gettimeofday(&tv, NULL); 
     36    return ((tv.tv_sec * 1000) + (long)(tv.tv_usec / 1000.0)); 
     37} 
    2938 
    3039// redraw the window 
    3140void display(void) 
    32   
     41 
    3342    mgr->redraw(); 
    3443 
    3544    // all done, swap     
    3645    glutSwapBuffers(); 
     46    frames++; 
     47    /* 
     48    e_time = get_milli_time(); 
     49    if(e_time - timebase > 5000.0) 
     50    { 
     51        std::cout << (long)(frames * 1000.0) /(e_time-timebase) << " FPS" << std::endl; 
     52        timebase=e_time; 
     53        frames=0; 
     54    }*/ 
    3755} 
    3856 
     
    6785 
    6886    // add optional elements 
    69 //    collector->getElem(Drawable::statNTriangles); 
     87    //collector->getElem(Drawable::statNTriangles); 
     88    //collector->getElem(RenderAction::statDrawTime); 
     89    //collector->getElem(RenderTraversalAction::statDrawTime); 
    7090} 
    7191 
     
    102122                      << std::endl; 
    103123              
     124        } 
     125        break; 
     126 
     127        case 'y': 
     128        { 
     129            Real32 cov = tact->getOcclusionCullingCoveredThreshold(); 
     130            cov+=0.1; 
     131            tact->setOcclusionCullingCoveredThreshold(cov); 
     132            std::cout << "Covered Threshold now: " << cov << std::endl; 
     133        } 
     134        break; 
     135             
     136        case 'h': 
     137        { 
     138            Real32 cov1 = tact->getOcclusionCullingCoveredThreshold(); 
     139            cov1-=0.1; 
     140            tact->setOcclusionCullingCoveredThreshold(cov1); 
     141            std::cout << "Covered Threshold now: " << cov1 << std::endl; 
     142        } 
     143            break; 
     144 
     145        case 'u': 
     146        { 
     147            UInt32 small = tact->getOcclusionCullingMinimumFeatureSize(); 
     148            small+=1; 
     149            tact->setOcclusionCullingMinimumFeatureSize(small); 
     150            std::cout << "Minimum Feature Size now: " << small << std::endl; 
     151        } 
     152        break; 
     153             
     154        case 'j': 
     155        { 
     156            UInt32 small1 = tact->getOcclusionCullingMinimumFeatureSize(); 
     157            small1-=1; 
     158            tact->setOcclusionCullingMinimumFeatureSize(small1); 
     159            std::cout << "Minimum Feature Size now: " << small1 << std::endl; 
     160        } 
     161        break; 
     162         
     163        case 'i': 
     164        { 
     165            UInt32 visT = tact->getOcclusionCullingVisibilityThreshold(); 
     166            visT+=1; 
     167            tact->setOcclusionCullingVisibilityThreshold(visT); 
     168            std::cout << "Visibility Threshold now: " << visT << std::endl; 
     169        } 
     170        break; 
     171 
     172        case 'k': 
     173        { 
     174            UInt32 visTa = tact->getOcclusionCullingVisibilityThreshold(); 
     175            visTa-=1; 
     176            tact->setOcclusionCullingVisibilityThreshold(visTa); 
     177            std::cout << "Visibility Threshold now: " << visTa << std::endl; 
    104178        } 
    105179        break; 
     
    155229    glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); 
    156230 
    157     glutInitWindowSize(500, 500); 
     231    glutInitWindowSize(1024, 768); 
    158232    glutCreateWindow("OpenSG"); 
    159233