- Timestamp:
- 05/14/08 19:06:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2676 r2677 70 70 71 71 72 void QtGlRendererBuffer::Make Current()72 void QtGlRendererBuffer::MakeLive() 73 73 { 74 74 QGLPixelBuffer::makeCurrent(); … … 77 77 78 78 79 void QtGlRendererBuffer::Done Current()79 void QtGlRendererBuffer::DoneLive() 80 80 { 81 81 QGLPixelBuffer::doneCurrent(); … … 92 92 QGL::DepthBuffer | 93 93 QGL::DoubleBuffer | 94 QGL::Rgba 95 ) ),94 QGL::Rgba) 95 ), 96 96 GlRendererBuffer(sceneGraph, viewcells, tree) 97 97 { … … 99 99 //mUseVbos = false; 100 100 101 Make Current();101 MakeLive(); 102 102 glViewport(0, 0, w, h); 103 103 glMatrixMode(GL_PROJECTION); … … 109 109 110 110 InitGL(); 111 DoneCurrent(); 111 112 //mydynamicTexture = generateDynamicTexture(); 113 // bind the dynamic texture to the pbuffer - this is a no-op under X11 114 //bindToDynamicTexture(mydynamicTexture); 115 116 DoneLive(); 112 117 } 113 118 … … 133 138 float QtGlRendererBuffer::GetPixelError(int &pvsSize) 134 139 { 135 Make Current();140 MakeLive(); 136 141 137 142 if (0) … … 141 146 cout << "rgba: " << format().rgba() << endl; 142 147 cout << "double: " << format().doubleBuffer() << endl; 148 cout << "depth: " << format().depth() << endl; 149 cout << "gl:" << format().hasOpenGL() << endl; 150 cout << "dir:" << format().directRendering() << endl; 143 151 } 144 152 … … 249 257 pixelCount = query->GetQueryResult(); 250 258 251 pErrorPixels = ((float)pixelCount) / (GetWidth() * GetHeight()); 252 259 pErrorPixels = (float)pixelCount / (GetWidth() * GetHeight()); 260 261 // some error happened 253 262 if (pixelCount > 0) 254 263 { … … 265 274 266 275 char filename[256]; 267 sprintf(filename, "error-frame-%04d-%0.5f.png", mFrame, pErrorPixels); 276 //sprintf(filename, "error-frame-%04d-%0.5f.png", mFrame, pErrorPixels); 277 sprintf(filename, "error-frame-%04d-%04d.png", mFrame, pixelCount); 268 278 QImage im = toImage(); 269 279 string str = mSnapPrefix + filename; … … 306 316 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 307 317 308 Done Current();318 DoneLive(); 309 319 310 320 return pErrorPixels; … … 2399 2409 // bind the dynamic texture to the pbuffer - this is a no-op under X11 2400 2410 mRenderBuffer->bindToDynamicTexture(dynamicTexture); 2401 makeCurrent();2411 //makeCurrent(); 2402 2412 } 2403 2413
Note: See TracChangeset
for help on using the changeset viewer.