Changeset 171 for trunk/VUT/work
- Timestamp:
- 07/13/05 00:47:40 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r164 r171 9 9 #include "OgreVisibilityTerrainSceneManager.h" 10 10 #include "VisibilityInfo.h" 11 #include "OgreItemBufferQueryManager.h"12 11 #include "OgreOcclusionQueriesQueryManager.h" 13 12 #include "TestCullingTerrainApplication.h" … … 414 413 dynamic_cast<VisibilityTerrainSceneManager *>(mSceneMgr); 415 414 416 if (useItemBuffer) 417 { 418 mQueryManager = new ItemBufferQueryManager(sm->GetHierarchyInterface(), 419 mWindow->getViewport(0), mRenderPatchesForItemBuffer); 420 } 421 else 422 { 423 mQueryManager = new OcclusionQueriesQueryManager(sm->GetHierarchyInterface(), 424 mWindow->getViewport(0)); 425 } 426 415 mQueryManager = new OcclusionQueriesQueryManager(sm->GetHierarchyInterface(), 416 mWindow->getViewport(0), false, useItemBuffer); 417 //mQueryManager = new PlatformQueryManager(sm->GetHierarchyInterface(), mWindow->getViewport(0), false); 418 427 419 sm->GetVisibilityManager()->SetQueryManager(mQueryManager); 428 420 … … 431 423 InfoContainer<GtpVisibility::PatchInfo> visiblePatches; 432 424 425 433 426 if (fromPoint) 434 427 { … … 442 435 &visibleNodes, &visibleGeometry, &visiblePatches, relativeVisibility); 443 436 } 437 438 std::stringstream d; 439 d << queryTypeCaptions[fromPoint ? 1 : 0].c_str() << " " 440 << queryRelativeVisCaptions[relativeVisibility ? 1 : 0].c_str() << " " 441 << queryMethodCaptions[useItemBuffer ? 1 : 0].c_str(); 442 LogManager::getSingleton().logMessage(d.str()); 443 444 444 445 445 float averageNodeVis = 0, averageGeometryVis = 0, averagePatchVis = 0; … … 457 457 458 458 averageGeometryVis += vis; 459 ++ geomSize;459 ++ geomSize; 460 460 461 std::stringstream d; d << "Geometry " << geomSize << " visibility: " << vis; 461 std::stringstream d; 462 d << "Geometry " << geomSize << " id: " << (*geomIt).GetMesh()->getSubEntity(0)->getId() 463 << " visibility: " << (*geomIt).GetVisiblePixels() << ", " << (*geomIt).GetProjectedPixels(); 462 464 LogManager::getSingleton().logMessage(d.str()); 463 465 } … … 475 477 476 478 averageNodeVis += vis; 477 ++ nodesSize;479 ++ nodesSize; 478 480 479 481 std::stringstream d; d << "Node visibility: " << vis; … … 484 486 InfoContainer<GtpVisibility::PatchInfo>::iterator patchIt, patchIt_end = visiblePatches.end(); 485 487 486 for (patchIt = visiblePatches.begin(); patchIt != patchIt_end; ++ patchIt)488 for (patchIt = visiblePatches.begin(); patchIt != patchIt_end; ++ patchIt) 487 489 { 488 490 // add if not 0 … … 493 495 494 496 averagePatchVis += vis; 495 ++ patchSize;497 ++ patchSize; 496 498 497 499 std::stringstream d; d << "Patch visibility: " << vis; … … 1410 1412 1411 1413 initOverlayElement(&mQueryTypeInfo , ext, "QueryType", top, ": 0"); top += vert_space; 1414 1415 initOverlayElement(&mQueryVisibleNodesInfo , ext, "VisibleNodes", top, ": 0"); top += vert_space; 1412 1416 initOverlayElement(&mQueryVisibleGeometryInfo , ext, "VisibleGeometry", top, ": 0"); top += vert_space; 1413 initOverlayElement(&mQueryVisibleNodesInfo , ext, "VisibleNodes", top, ": 0"); top += vert_space;1414 1417 initOverlayElement(&mQueryVisiblePatchInfo , ext, "VisiblePatches", top, ": 0"); top += vert_space; 1418 1415 1419 initOverlayElement(&mQueryNodeVisibilityInfo , ext, "NodeVisibility", top, ": 0"); top += vert_space; 1416 1420 initOverlayElement(&mQueryGeometryVisibilityInfo , ext, "GeometryVisibility", top, ": 0"); top += vert_space; -
trunk/VUT/work/ogre_changes/RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp
r166 r171 928 928 HRESULT hr; 929 929 LPDIRECT3DSURFACE9 pSurf=NULL, pTempSurf=NULL; 930 //IDirect3DSurface9 *pTempSurf=NULL; 930 931 D3DSURFACE_DESC desc; 931 932 D3DDISPLAYMODE dm; … … 953 954 } 954 955 955 //if (FAILED(hr = mpD3DDevice->GetFrontBufferData(0, pTempSurf)))956 if (FAILED(hr = mpD3DDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pTempSurf)))956 if (FAILED(hr = mpD3DDevice->GetFrontBufferData(0, pTempSurf))) 957 //if (FAILED(hr = mpD3DDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pTempSurf))) 957 958 { 958 959 SAFE_RELEASE(pTempSurf); … … 1058 1059 } 1059 1060 1060 1061 //pTempSurf->UnlockRect(); 1061 1062 SAFE_RELEASE(pTempSurf); 1062 1063 SAFE_RELEASE(pSurf);
Note: See TracChangeset
for help on using the changeset viewer.