Ignore:
Timestamp:
04/29/08 11:19:06 (16 years ago)
Author:
mattausch
Message:

debugging vp evaluation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2662 r2663  
    101101QtGlRendererBuffer::RenderPvs(const ObjectPvs &pvs) 
    102102{ 
    103 #if TEST_PVS_RENDERING  
    104  
    105   // Render PVS 
    106   ObjectPvsIterator it = pvs.GetIterator(); 
    107    
    108   Intersectable::NewMail(); 
    109   mCurrentFrame++; 
    110   while (it.HasMoreEntries())  
    111         { 
    112           RenderIntersectable(it.Next()); 
    113         } 
    114  
    115 #else 
    116    
    117   PreparePvs(pvs); 
    118  
    119   int offset = (int)mObjects.size() * 3; 
    120   char *arrayPtr = mUseVbos ? NULL : (char *)mData; 
    121  
    122   glVertexPointer(3, GL_FLOAT, 0, (char *)arrayPtr); 
    123   glNormalPointer(GL_FLOAT, 0, (char *)arrayPtr + offset * sizeof(Vector3)); 
    124   glDrawElements(GL_TRIANGLES, mIndexBufferSize, GL_UNSIGNED_INT, mIndices); 
    125    
    126 #endif 
     103        PreparePvs(pvs); 
     104 
     105        int offset = (int)mObjects.size() * 3; 
     106        char *arrayPtr = mUseVbos ? NULL : (char *)mData; 
     107 
     108        glVertexPointer(3, GL_FLOAT, 0, (char *)arrayPtr); 
     109        glNormalPointer(GL_FLOAT, 0, (char *)arrayPtr + offset * sizeof(Vector3)); 
     110        glDrawElements(GL_TRIANGLES, mIndexBufferSize, GL_UNSIGNED_INT, mIndices); 
    127111} 
    128112 
     
    136120        float pErrorPixels = -1.0f; 
    137121 
    138  
    139122        mUseFalseColors = false; 
    140         unsigned int pixelCount; 
     123        unsigned int pixelCount = 0; 
    141124 
    142125 
     
    153136        if (!evaluateFilter)  
    154137                pvs = viewcell->GetPvs(); 
    155         else { 
    156  
    157                 mViewCellsManager->ApplyFilter2(viewcell, 
    158                         false, 
    159                         mViewCellsManager->GetFilterWidth(), 
    160                         pvs); 
    161         } 
     138        else  
     139                mViewCellsManager->ApplyFilter2(viewcell, false, mViewCellsManager->GetFilterWidth(), pvs); 
     140 
    162141 
    163142        mUseForcedColors = true; 
     
    168147        glColor3f(0,1,0); 
    169148 
     149        glDepthFunc(GL_LESS); 
     150        glDepthMask(GL_TRUE); 
     151        glEnable(GL_DEPTH_TEST); 
    170152 
    171153        glStencilFunc(GL_EQUAL, 0x0, 0x1); 
     
    182164 
    183165 
    184         OcclusionQuery *query = mOcclusionQueries[0]; 
     166        OcclusionQuery *query = mOcclusionQueries[1]; 
    185167 
    186168        Intersectable::NewMail(); 
     
    193175        glDisable(GL_STENCIL_TEST);  
    194176 
     177 
    195178        // reenable other state 
    196         //  int wait=0; 
    197         //  while (!query.ResultAvailable()) { 
    198         //      wait++; 
    199         //  } 
     179        int wait = 0; 
     180         
     181        while (0 && !query->ResultAvailable())  
     182        { 
     183                wait ++; 
     184        } 
    200185 
    201186 
     
    16481633                                                                                                 const ViewCellInfoContainer &compareInfo) 
    16491634{ 
    1650         //cout << "comparing " << viewcells.size() << " view cells to " << compareInfo.size() << " values" << endl; 
    1651  
    16521635        if (viewcells.size() > compareInfo.size()) 
    16531636        { 
    1654                 cerr << "loaded size (" << (int)compareInfo.size() << ") does not fit to view cells size (" << (int)viewcells.size() << ")" << endl; 
     1637                cerr << "loaded size (" << (int)compareInfo.size()  
     1638                         << ") does not fit to view cells size (" << (int)viewcells.size() << ")" << endl; 
    16551639                return; 
    16561640        } 
Note: See TracChangeset for help on using the changeset viewer.