Changeset 2612 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 01/17/08 23:56:46 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2611 r2612 1350 1350 1351 1351 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, depthMapSize, 1352 depthMapSize, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);1352 depthMapSize, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL); 1353 1353 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 1354 1354 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); … … 1393 1393 1394 1394 #endif 1395 1396 1395 #endif 1397 1396 DoneCurrent(); … … 1414 1413 1415 1414 bool result = GlRenderer::ValidViewPoint(); 1416 1415 1417 1416 DoneCurrent(); 1418 1417 … … 1443 1442 if (!ValidViewPoint()) 1444 1443 mPvsErrorBuffer[i].mError = -1.0f; 1445 1444 1446 1445 // manualy corrected view point 1447 1446 if (mFrame == 5105) … … 1594 1593 glEnable( GL_CULL_FACE ); 1595 1594 1596 // 1597 // while (!query.ResultAvailable()) {1598 // wait++;1599 // 1595 // int wait = 0; 1596 // while (!query->ResultAvailable()) { 1597 // wait++; 1598 // } 1600 1599 1601 1600 // reenable other state … … 1603 1602 // cout<<"VV4 "; 1604 1603 1605 //cout<<"count: " << pixelCount<<endl;1606 1604 1607 1605 if (pixelCount > 0) -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2610 r2612 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 17. I 2 2:17:4420083 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 17. I 23:22:18 2008 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 63 63 $(MAKE) -f $(MAKEFILE).Debug uninstall 64 64 65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc 2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 66 66 C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 67 67 C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ -
GTP/trunk/Lib/Vis/Preprocessing/src/OcclusionQuery.cpp
r2575 r2612 11 11 #include <SDL/SDL_opengl.h> 12 12 #endif 13 14 #define _ARBGL 13 15 14 16 using namespace std; -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2611 r2612 101 101 QtGlRendererBuffer::GetPixelError(int &pvsSize) 102 102 { 103 float pErrorPixels = -1.0f; 103 104 float pErrorPixels = -1.0f; 104 105 105 106 … … 135 136 Intersectable::NewMail(); 136 137 while (it.HasMoreEntries()) 137 {138 { 138 139 RenderIntersectable(it.Next()); 139 }140 } 140 141 141 142 … … 147 148 148 149 OcclusionQuery *query = mOcclusionQueries[0]; 149 150 150 151 151 query->BeginQuery(); 152 152 … … 157 157 query->EndQuery(); 158 158 glDisable(GL_STENCIL_TEST); 159 159 160 // reenable other state 160 161 // int wait=0; … … 162 163 // wait++; 163 164 // } 164 165 165 166 166 167 pixelCount = query->GetQueryResult(); … … 170 171 171 172 if (mSnapErrorFrames && pErrorPixels >= 0.01f) { 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 { 211 212 } 213 214 215 216 217 218 219 220 } 221 173 glReadBuffer(GL_BACK); 174 175 char filename[256]; 176 sprintf(filename, "error-frame-%04d-%0.5f.png", mFrame, pErrorPixels); 177 QImage im = toImage(); 178 string str = mSnapPrefix + filename; 179 QString qstr(str.c_str()); 180 181 im.save(qstr, "PNG"); 182 if (1) { //0 && mFrame == 1543) { 183 int x,y; 184 int lastIndex = -1; 185 for (y=0; y < im.height(); y++) 186 for (x=0; x < im.width(); x++) { 187 QRgb p = im.pixel(x,y); 188 int index = qRed(p) + (qGreen(p)<<8) + (qBlue(p)<<16); 189 if (qGreen(p) != 255 && index!=0) { 190 if (index != lastIndex) { 191 // Debug<<"ei="<<index<<" "; 192 lastIndex = index; 193 } 194 } 195 } 196 } 197 198 199 mUseFalseColors = false; 200 glPushAttrib(GL_CURRENT_BIT); 201 glColor3f(0,1,0); 202 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 203 SetupCamera(); 204 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 205 206 // Render PVS 207 Intersectable::NewMail(); 208 209 ObjectPvsIterator it = pvs.GetIterator(); 210 for (; it.HasMoreEntries(); ) 211 { 212 RenderIntersectable(it.Next()); 213 } 214 215 im = toImage(); 216 sprintf(filename, "error-frame-%04d-%0.5f-pvs.png", mFrame, pErrorPixels); 217 str = mSnapPrefix + filename; 218 qstr = str.c_str(); 219 im.save(qstr, "PNG"); 220 glPopAttrib(); 221 } 222 222 223 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 223 224 224 225 return pErrorPixels; 225 226 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel
r2611 r2612 4 4 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 5 5 #COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=500000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+" 6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=500000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ "6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=500000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+" 7 7 8 8 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r2610 r2612 28 28 unix:INCLUDEPATH += ../support/src/xerces-c-src_2_7_0/include 29 29 30 #XERCES = $$NONGTP/Xerces/xerces31 XERCES = $$NONGTP/Xerces/xerces-c_2_8_030 XERCES = $$NONGTP/Xerces/xerces 31 #XERCES = $$NONGTP/Xerces/xerces-c_2_8_0 32 32 33 33 INCLUDEPATH += ../src ../src/Timer ../src/QtInterface $$XERCES/include $$NONGTP/Zlib/include $$NONGTP/Boost $$NONGTP/Devil/include
Note: See TracChangeset
for help on using the changeset viewer.