summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/client.cc
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 21:50:16 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 21:50:16 +0000
commit003115b235d75df8b05ff25f75d27d90ad68b1d7 (patch)
tree89e52e466f7a3aba9bd2039de7756a9b1289188a /o3d/core/cross/client.cc
parentf50c985adc5efbf014159f8c6a76919cf33aa25d (diff)
downloadchromium_src-003115b235d75df8b05ff25f75d27d90ad68b1d7.zip
chromium_src-003115b235d75df8b05ff25f75d27d90ad68b1d7.tar.gz
chromium_src-003115b235d75df8b05ff25f75d27d90ad68b1d7.tar.bz2
Review URL: http://codereview.chromium.org/151103
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/client.cc')
-rw-r--r--o3d/core/cross/client.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/o3d/core/cross/client.cc b/o3d/core/cross/client.cc
index 341ff915..54aca22 100644
--- a/o3d/core/cross/client.cc
+++ b/o3d/core/cross/client.cc
@@ -116,11 +116,8 @@ Client::~Client() {
// Assigns a Renderer to the Client, and also assigns the Client
// to the Renderer and sets up the default render graph
void Client::Init() {
- if (!renderer_.IsAvailable()) {
- // Don't allow packs to be created.
- object_manager_->DisallowPackCreation();
+ if (!renderer_.IsAvailable())
return;
- }
// Create the root node for the scenegraph. Note that the root lives
// outside of a pack object. The root's lifetime is directly bound to that
@@ -144,6 +141,16 @@ void Client::Cleanup() {
counter_manager_.ClearAllCallbacks();
}
+Pack* Client::CreatePack() {
+ if (!renderer_.IsAvailable()) {
+ O3D_ERROR(service_locator_)
+ << "No Renderer available, Pack creation not allowed.";
+ return NULL;
+ }
+
+ return object_manager_->CreatePack();
+}
+
// Tick Methods ----------------------------------------------------------------
void Client::SetTickCallback(