Ignore:
Timestamp:
04/29/08 16:20:37 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2663 r2664  
    131131                                                      mDetectEmptyViewSpace); 
    132132 
    133         mSnapErrorFrames = false; 
     133        //mSnapErrorFrames = false; 
     134        mSnapErrorFrames = true; 
    134135        mSnapPrefix = "snap/"; 
    135136        mUseForcedColors = false; 
     
    706707                for (q = 0; ((j + q) < (int)mObjects.size()) && (q < numQ); ++ q)  
    707708                { 
    708                         //glFinish(); 
    709709                        mOcclusionQueries[q]->BeginQuery(); 
    710710                         
     
    712712                 
    713713                        mOcclusionQueries[q]->EndQuery(); 
    714                         //glFinish(); 
    715714                } 
    716715                //cout << "q: " << q << endl; 
     
    14171416void GlRendererBuffer::InitGL() 
    14181417{ 
    1419         MakeCurrent();  
     1418        //MakeCurrent();  
    14201419        GlRenderer::InitGL(); 
    14211420 
     1421#if 0 
    14221422        // initialise dual depth buffer textures 
    14231423        glGenTextures(1, &frontDepthMap); 
     
    14421442        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); 
    14431443 
    1444 #if 0 
     1444 
    14451445#ifdef USE_CG 
    14461446 
     
    14801480#endif 
    14811481#endif 
    1482         DoneCurrent(); 
     1482        //DoneCurrent(); 
    14831483} 
    14841484 
     
    15141514  SetupProjection(GetWidth(), GetHeight()); 
    15151515 
    1516   cout<<"Random Pvs STATS, mPvsStatFrames="<<mPvsStatFrames<<endl; 
     1516  cout << "Random Pvs STATS, mPvsStatFrames=" << mPvsStatFrames << endl; 
    15171517   
    15181518  for (int i=0; i < mPvsStatFrames; i++) { 
     
    15371537 
    15381538 
    1539         if (mPvsErrorBuffer[i].mError > 0.0f) { 
    1540           int pvsSize; 
    1541  
    1542           float error = GetPixelError(pvsSize); 
    1543  
    1544           mPvsErrorBuffer[i].mError = error; 
    1545           mPvsErrorBuffer[i].mPvsSize = pvsSize; 
    1546  
    1547           //      emit UpdatePvsErrorItem(i, 
    1548           //                                                      mPvsErrorBuffer[i]); 
    1549           cout<<"("<<i<<" ["<<mViewPoint<<"]["<<mViewDirection<<"] "<<mPvsErrorBuffer[i].mError<<")"; 
    1550           //      swapBuffers(); 
    1551         } 
    1552          
     1539        if (mPvsErrorBuffer[i].mError > 0.0f) { 
     1540                int pvsSize; 
     1541 
     1542                float error = GetPixelError(pvsSize); 
     1543 
     1544                mPvsErrorBuffer[i].mError = error; 
     1545                mPvsErrorBuffer[i].mPvsSize = pvsSize; 
     1546 
     1547                cout<<"("<<i<<" ["<<mViewPoint<<"]["<<mViewDirection<<"] "<<mPvsErrorBuffer[i].mError<<")"; 
     1548        } 
     1549 
    15531550        err = mPvsErrorBuffer[i].mError; 
    15541551         
     
    16301627                { 
    16311628                        // compute the pixel error 
    1632                         float error = GetPixelError(pvsSize); 
     1629                        const float error = GetPixelError(pvsSize); 
    16331630 
    16341631                        mPvsErrorBuffer[i].mError = error; 
    16351632                        mPvsErrorBuffer[i].mPvsSize = pvsSize; 
    16361633 
    1637                         int pixelError = (int)mPvsErrorBuffer[i].mError * GetWidth() * GetHeight(); 
    1638  
     1634                        const int pixelError = (int)mPvsErrorBuffer[i].mError * GetWidth() * GetHeight(); 
    16391635                        if (0 && (pixelError > 0) && (pvsSize > 0))  
    16401636                        { 
    1641                                 cout << "!err: " << i << "," << mViewPoint << "," << mViewDirection << " " << mPvsErrorBuffer[i].mError * GetWidth() * GetHeight() << endl; 
     1637                                cout << "err: " << i << "," << mViewPoint << "," << mViewDirection << " "  
     1638                                         << mPvsErrorBuffer[i].mError * GetWidth() * GetHeight() << endl; 
    16421639                        } 
    16431640                } 
Note: See TracChangeset for help on using the changeset viewer.