Changeset 2671 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 04/30/08 18:53:06 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2670 r2671 113 113 void QtGlRendererBuffer::RenderPvs(const ObjectPvs &pvs) 114 114 { 115 EnableDrawArrays(); 115 116 PreparePvs(pvs); 117 118 if (mUseVbos) 119 glBindBufferARB(GL_ARRAY_BUFFER_ARB, mVboId); 116 120 117 121 int offset = (int)mObjects.size() * 3; … … 128 132 { 129 133 MakeCurrent(); 130 134 131 135 if (0) 132 136 { … … 213 217 Intersectable::NewMail(); 214 218 215 KdNode::NewMail2();216 Intersectable::NewMail();217 KdNode::NewMail2();218 Intersectable::NewMail();219 220 219 // render pvs once 221 220 RenderPvs(pvs); 221 222 //cout << "rendered nodes: " << mRenderedNodes << endl; 222 223 223 224 //glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); … … 226 227 227 228 glEnable(GL_STENCIL_TEST); 228 glColor3f(1, 0,0);229 glColor3f(1, 0, 0); 229 230 230 231 … … 250 251 if (pixelCount > 0) 251 252 { 252 cout << " vc id: " << viewcell->GetId() << " pvs: " << pvsSize << " pc: " << pixelCount << endl;253 cout << "frame " << mFrame << " vc id: " << viewcell->GetId() << " pvs: " << pvsSize << " pc: " << pixelCount << endl; 253 254 254 255 if (mSnapErrorFrames) … … 256 257 glReadBuffer(GL_BACK); 257 258 //glReadBuffer(GL_FRONT); 259 258 260 259 261 ////////////// … … 284 286 285 287 ++ mCurrentFrame; 288 286 289 // render pvs once 287 290 RenderPvs(pvs); … … 290 293 291 294 im = toImage(); 292 sprintf(filename, "error-frame-%04d-%0 .5f-pvs.png", mFrame, pErrorPixels);295 sprintf(filename, "error-frame-%04d-%04d-%0.5f-pvs.png", mFrame, viewcell->GetId(), pErrorPixels); 293 296 str = mSnapPrefix + filename; 294 297 qstr = str.c_str(); … … 331 334 ObjectContainer::iterator oit = 332 335 lower_bound(objects.begin(), objects.end(), &dummy, ilt); 333 334 336 335 337 if (//(oit != oit.end()) && … … 464 466 void QtGlRendererWidget::_RenderPvs() 465 467 { 468 EnableDrawArrays(); 469 if (mUseVbos) 470 glBindBufferARB(GL_ARRAY_BUFFER_ARB, mVboId); 471 466 472 mUseFalseColors = false; 467 473 … … 583 589 584 590 // update the indices for rendering 585 PreparePvs 2(mPvsCache.mPvs);591 PreparePvs(mPvsCache.mPvs); 586 592 emit PvsUpdated(); 587 593 mCurrentPvsCost = mPvsCache.mPvs.EvalPvsCost(); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2670 r2671 74 74 75 75 int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; 76 76 77 77 78 public:
Note: See TracChangeset
for help on using the changeset viewer.