Changeset 2963 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 09/22/08 10:10:01 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2961 r2963 447 447 448 448 449 450 // set far plane based on scene extent 451 farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal()); 452 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 453 454 camera->SetFar(Magnitude(bvh->GetBox().Diagonal())); 455 456 InitCg(); 457 458 DeferredRenderer::Init(sCgContext); 459 SkyPreetham::Init(sCgContext); 460 449 461 Vector3 cubeCenter(470.398f, 240.364f, 182.5f); 450 462 /*AxisAlignedBox3 box(cubeCenter - Vector3(2.0f), cubeCenter + Vector3(2.0f)); … … 457 469 Matrix4x4 transl = TranslationMatrix(cubeCenter); 458 470 459 const string aeroplaneStr = model_path + "toyplane.dem"; 471 //const string aeroplaneStr = model_path + "toyplane.dem"; 472 const string aeroplaneStr = model_path + "city_full.dem"; 460 473 461 474 SceneEntityContainer dummy; … … 471 484 } 472 485 473 aeroplane = dummy[0];474 aeroplane->GetTransform()->MultMatrix(transl);475 dummy.clear();476 477 478 // set far plane based on scene extent479 farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal());480 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf);481 482 camera->SetFar(Magnitude(bvh->GetBox().Diagonal()));483 484 InitCg();485 486 DeferredRenderer::Init(sCgContext);487 SkyPreetham::Init(sCgContext);488 489 490 486 string skyDomeStr(model_path + "sky.dem"); 491 487 … … 500 496 } 501 497 502 skyDome = dummy[0]; 503 498 aeroplane = dummy[0]; 499 skyDome = dummy[1]; 500 501 aeroplane->GetTransform()->MultMatrix(transl); 502 504 503 const float turbitiy = 3.0f; 505 504 preetham = new SkyPreetham(turbitiy, skyDome); … … 1087 1086 { 1088 1087 // actually render the scene geometry using the specified algorithm 1089 traverser->RenderScene(); 1088 //traverser->RenderScene(); 1089 state.Reset(); 1090 /* SceneEntityContainer::const_iterator sit, sit_end = sceneEntities.end(); 1091 1092 for (sit = sceneEntities.begin(); sit != sit_end; ++ sit) 1093 { 1094 renderQueue->Enqueue(*sit); 1095 }*/ 1096 1097 aeroplane->Render(&state); 1098 1099 renderQueue->Apply(); 1090 1100 } 1091 1101 … … 1112 1122 1113 1123 //state.Reset(); glEnable(GL_TEXTURE_2D); 1114 aeroplane->Render(&state);1124 //aeroplane->Render(&state); 1115 1125 1116 1126
Note: See TracChangeset
for help on using the changeset viewer.