Changeset 133 for trunk/VUT/Ogre/src
- Timestamp:
- 06/15/05 01:18:51 (19 years ago)
- Location:
- trunk/VUT/Ogre/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp
r130 r133 188 188 else 189 189 { 190 // used by the scene manager, because bounding box rendering must be handled 191 // differently 190 192 mIsBoundingBoxQuery = true; 191 193 -
trunk/VUT/Ogre/src/OgreVisibilitySceneManagerDll.cpp
r121 r133 46 46 47 47 //----------------------------------------------------------------------- 48 extern "C" void dllStartPlugin(void)48 extern "C" void __declspec(dllexport) dllStartPlugin(void) 49 49 { 50 50 visEnv = new GtpVisibility::VisibilityEnvironment(); … … 66 66 } 67 67 //----------------------------------------------------------------------- 68 extern "C" void dllStopPlugin() 68 extern "C" void __declspec(dllexport) dllShutdownPlugin() 69 { 70 visibilityTerrainPlugin->shutdown(); 71 heightmapTerrainPageSource->shutdown(); 72 } 73 //----------------------------------------------------------------------- 74 extern "C" void __declspec(dllexport) dllStopPlugin() 69 75 { 70 76 delete heightmapTerrainPageSource; … … 77 83 delete visEnv; 78 84 } 79 //----------------------------------------------------------------------- 80 extern "C" void dllShutdownPlugin() 81 { 82 visibilityTerrainPlugin->shutdown(); 83 heightmapTerrainPageSource->shutdown(); 84 } 85 85 86 86 87 } //namespace Ogre -
trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
r130 r133 25 25 mUseDepthPass(false), 26 26 mRenderItemBuffer(false), 27 mCurrentEntityId(0) 27 mCurrentEntityId(0), 28 mEnableDepthWrite(true) 28 29 { 29 30 mHierarchyInterface = new OctreeHierarchyInterface(this, mDestRenderSystem); … … 145 146 146 147 // set depth fill pass only if depth write enabled 147 Pass *usedPass = (mRenderDepthPass && !mHierarchyInterface->IsBoundingBoxQuery() ? mDepthPass : pass); 148 Pass *usedPass = (mRenderDepthPass && !mHierarchyInterface->IsBoundingBoxQuery() ? 149 mDepthPass : pass); 148 150 149 151 IlluminationRenderStage savedStage = mIlluminationStage; … … 158 160 if (mRenderDepthPass) 159 161 { 160 // set vertex program of current pass162 // --- set vertex program of current pass so z-buffer is updated correctly 161 163 if (pass->hasVertexProgram()) 162 164 { … … 178 180 } 179 181 } 182 183 bool IsDepthWrite = usedPass->getDepthWriteEnabled(); 184 // global option which enables / disables depth writes 185 if (!mEnableDepthWrite) 186 { 187 usedPass->setDepthWriteEnabled(false); 188 } 189 180 190 //else if (mIsItemBufferPass) {usedPass = mItemBufferPass;} 181 191 182 192 Pass *result = SceneManager::setPass(usedPass); 193 194 // reset depth write 195 if (!mEnableDepthWrite) 196 { 197 usedPass->setDepthWriteEnabled(IsDepthWrite); 198 } 183 199 184 200 // reset illumination stage … … 191 207 { 192 208 // needs full ambient lighting for item colors to be exact 193 if (mRenderItemBuffer) 194 { 195 setAmbientLight(ColourValue(1,1,1,1)); 196 } 197 //getRenderQueue()->clear(); 198 209 /*if (mRenderItemBuffer) 210 { setAmbientLight(ColourValue(1,1,1,1)); }*/ 211 199 212 //-- show visible scene nodes and octree bounding boxes from last frame 200 213 if (mShowVisualization) … … 374 387 { 375 388 TerrainRenderable::setCurrentRenderLevelIndex((*static_cast<const int *>(val))); 389 return true; 390 } 391 if (key == "DepthCheck") 392 { 393 mEnableDepthWrite = (*static_cast<const bool *>(val)); 376 394 return true; 377 395 } … … 508 526 } 509 527 510 // ----- TRANSPARENT LOOP: must be handle t differently altough we don't really511 // care about transparents for the item buffer528 // ----- TRANSPARENT LOOP: must be handled differently 529 // although we don't really care about transparents for the item buffer 512 530 // TODO: HOW TO HANDLE OCCLUDED OBJECTS ???? 513 531 RenderPriorityGroup::TransparentRenderablePassList
Note: See TracChangeset
for help on using the changeset viewer.