Changeset 2664 for GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
- Timestamp:
- 04/29/08 16:20:37 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2663 r2664 131 131 mDetectEmptyViewSpace); 132 132 133 mSnapErrorFrames = false; 133 //mSnapErrorFrames = false; 134 mSnapErrorFrames = true; 134 135 mSnapPrefix = "snap/"; 135 136 mUseForcedColors = false; … … 706 707 for (q = 0; ((j + q) < (int)mObjects.size()) && (q < numQ); ++ q) 707 708 { 708 //glFinish();709 709 mOcclusionQueries[q]->BeginQuery(); 710 710 … … 712 712 713 713 mOcclusionQueries[q]->EndQuery(); 714 //glFinish();715 714 } 716 715 //cout << "q: " << q << endl; … … 1417 1416 void GlRendererBuffer::InitGL() 1418 1417 { 1419 MakeCurrent();1418 //MakeCurrent(); 1420 1419 GlRenderer::InitGL(); 1421 1420 1421 #if 0 1422 1422 // initialise dual depth buffer textures 1423 1423 glGenTextures(1, &frontDepthMap); … … 1442 1442 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); 1443 1443 1444 #if 0 1444 1445 1445 #ifdef USE_CG 1446 1446 … … 1480 1480 #endif 1481 1481 #endif 1482 DoneCurrent();1482 //DoneCurrent(); 1483 1483 } 1484 1484 … … 1514 1514 SetupProjection(GetWidth(), GetHeight()); 1515 1515 1516 cout <<"Random Pvs STATS, mPvsStatFrames="<<mPvsStatFrames<<endl;1516 cout << "Random Pvs STATS, mPvsStatFrames=" << mPvsStatFrames << endl; 1517 1517 1518 1518 for (int i=0; i < mPvsStatFrames; i++) { … … 1537 1537 1538 1538 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 1553 1550 err = mPvsErrorBuffer[i].mError; 1554 1551 … … 1630 1627 { 1631 1628 // compute the pixel error 1632 float error = GetPixelError(pvsSize);1629 const float error = GetPixelError(pvsSize); 1633 1630 1634 1631 mPvsErrorBuffer[i].mError = error; 1635 1632 mPvsErrorBuffer[i].mPvsSize = pvsSize; 1636 1633 1637 int pixelError = (int)mPvsErrorBuffer[i].mError * GetWidth() * GetHeight(); 1638 1634 const int pixelError = (int)mPvsErrorBuffer[i].mError * GetWidth() * GetHeight(); 1639 1635 if (0 && (pixelError > 0) && (pvsSize > 0)) 1640 1636 { 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; 1642 1639 } 1643 1640 }
Note: See TracChangeset
for help on using the changeset viewer.