ScenePtr scene = new Scene;
// Second-phase construction
- scene->Initialize( size );
+ scene->Initialize( size, 0 );
+
+ return scene;
+}
+
+ScenePtr Scene::New( Size size, int orientation )
+{
+ ScenePtr scene = new Scene;
+
+ // Second-phase construction
+ scene->Initialize( size, orientation );
return scene;
}
// When this destructor is called, the scene has either already been removed from Core or Core has already been destroyed
}
-void Scene::Initialize( Size size )
+void Scene::Initialize( Size size, int orientation )
{
ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
// Create the default render-task and ensure clear is enabled on it to show the background color
RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() );
renderTask->SetClearEnabled(true);
+ mSurfaceOrientation = orientation;
SurfaceResized( size.width, size.height, mSurfaceOrientation, false );