Browse Source

Use the same object count in RenderToTexture as in AnimatingScene.

Lasse Öörni 12 years ago
parent
commit
27f1f3ec59

+ 1 - 1
Source/Samples/04_StaticScene/StaticScene.cpp

@@ -79,7 +79,7 @@ void StaticScene::CreateScene()
     // optimizing manner
     scene_->CreateComponent<Octree>();
     
-    // Create a child scene node (at world origin) and a StaticModel component into it. Set the StaticModel to show a simple 
+    // Create a child scene node (at world origin) and a StaticModel component into it. Set the StaticModel to show a simple
     // plane mesh with a "stone" material. Note that naming the scene nodes is optional. Scale the scene node larger
     // (100 x 100 world units)
     Node* planeNode = scene_->CreateChild("Plane");

+ 3 - 4
Source/Samples/10_RenderToTexture/RenderToTexture.cpp

@@ -95,13 +95,12 @@ void RenderToTexture::CreateScene()
         zone->SetFogStart(10.0f);
         zone->SetFogEnd(100.0f);
         
-        // Create randomly positioned and oriented box StaticModels in the scene. Use less of them as in the actual
-        // AnimatingScene sample to avoid the scene update (rotating the boxes) taking too much CPU time
-        const unsigned NUM_OBJECTS = 1000;
+        // Create randomly positioned and oriented box StaticModels in the scene
+        const unsigned NUM_OBJECTS = 2000;
         for (unsigned i = 0; i < NUM_OBJECTS; ++i)
         {
             Node* boxNode = rttScene_->CreateChild("Box");
-            boxNode->SetPosition(Vector3(Random(100.0f) - 50.0f, Random(100.0f) - 50.0f, Random(100.0f) - 50.0f));
+            boxNode->SetPosition(Vector3(Random(200.0f) - 100.0f, Random(200.0f) - 100.0f, Random(200.0f) - 100.0f));
             // Orient using random pitch, yaw and roll Euler angles
             boxNode->SetRotation(Quaternion(Random(360.0f), Random(360.0f), Random(360.0f)));
             StaticModel* boxObject = boxNode->CreateComponent<StaticModel>();