Changeset 1321 for GTP/trunk/App
- Timestamp:
- 09/04/06 15:35:59 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Geom
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Geom/Demo_LodStrips/main.cpp
r1306 r1321 13 13 /*===========================================================================*/ 14 14 #include "ExampleApplication.h" 15 //#include "OgreLodStripsLibrary.h"16 15 #include "GeoLodStripsLibrary.h" 17 16 #include "GeoMeshLoader.h" … … 404 403 myStrips = new Geometry::LodStripsLibrary(meshloader->GetLodStripsData(),themesh); 405 404 406 for (unsigned int i=0; i<ogreMesh->getNumSubMeshes(); i++)407 {408 Ogre::RenderOperation mRenderOp;409 ogreMesh->getSubMesh(i)->_getRenderOperation(mRenderOp,0);410 int indices_to_render = myStrips->GetValidIndexCount(i);411 412 mRenderOp.indexData->indexBuffer =413 Ogre::HardwareBufferManager::getSingleton().createIndexBuffer(414 Ogre::HardwareIndexBuffer::IT_32BIT, // type of index415 indices_to_render, // number of indexes416 Ogre::HardwareBuffer::HBU_DISCARDABLE , // usage417 false);418 }419 420 405 entity->setNormaliseNormals(true); 421 406 aboveWaterEnts.push_back(entity); 422 407 entity->setMaterialName("LODStripsDemo/Ogro"); 423 408 424 for (int i=-3; i<7; i++) 425 for (int j=0; j<4; j++) 409 for (int i=-3; i<7; i++) // 7 410 for (int j=0; j<4; j++) // 4 426 411 { 427 412 char newObjName[16]=""; -
GTP/trunk/App/Demos/Geom/Demo_LodTrees/Demo_LodTrees.vcproj
r1092 r1321 48 48 Name="VCPostBuildEventTool" 49 49 CommandLine="xcopy /Y ..\OgreStuff\bin\Debug\*.dll build\Debug 50 xcopy /Y ..\OgreStuff\bin\Debug\*.cfg build\Debug 51 "/> 50 xcopy /Y ..\OgreStuff\bin\Debug\*.cfg build\Debug"/> 52 51 <Tool 53 52 Name="VCPreBuildEventTool"/> … … 101 100 Name="VCPostBuildEventTool" 102 101 CommandLine="xcopy /Y ..\OgreStuff\bin\Release\*.dll build\Release 103 xcopy /Y ..\OgreStuff\bin\Release\*.cfg build\Release 104 "/> 102 xcopy /Y ..\OgreStuff\bin\Release\*.cfg build\Release"/> 105 103 <Tool 106 104 Name="VCPreBuildEventTool"/> -
GTP/trunk/App/Demos/Geom/Demo_LodTrees/main.cpp
r1307 r1321 281 281 { 282 282 bool istrunk = myTrees->GetLeavesSubMesh()!=submesh; 283 int indices_to_render = 0;284 283 if (istrunk) 285 {286 284 entity->getSubEntity(submesh)->setMaterialName("Examples/Populifolia/trunk"); 287 indices_to_render = myTrees->GetValidTrunkIndexCount(submesh);288 }289 285 else 290 {291 286 entity->getSubEntity(submesh)->setMaterialName("Examples/Populifolia/leaf"); 292 indices_to_render = myTrees->CurrentLOD_Foliage_IndexCount();293 }294 295 Ogre::RenderOperation mRenderOp;296 ogreMesh->getSubMesh(submesh)->_getRenderOperation(mRenderOp,0);297 298 mRenderOp.indexData->indexBuffer = Ogre::HardwareBufferManager::getSingleton().createIndexBuffer(299 Ogre::HardwareIndexBuffer::IT_32BIT, // type of index300 indices_to_render, // number of indexes301 Ogre::HardwareBuffer::HBU_DISCARDABLE , // usage302 false); // no shadow buffer303 287 } 304 288
Note: See TracChangeset
for help on using the changeset viewer.