Chromium Code Reviews| Index: core/cross/client.cc |
| =================================================================== |
| --- core/cross/client.cc (revision 19521) |
| +++ core/cross/client.cc (working copy) |
| @@ -116,11 +116,8 @@ |
| // 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,15 @@ |
| counter_manager_.ClearAllCallbacks(); |
| } |
| +Pack* Client::CreatePack() { |
| + if (!renderer_.IsAvailable()) { |
| + O3D_ERROR(service_locator_) << "Pack creation not allowed"; |
|
gman
2009/06/30 21:32:11
How about changing this message to "No Renderer av
|
| + return NULL; |
| + } |
| + |
| + return object_manager_->CreatePack(); |
| +} |
| + |
| // Tick Methods ---------------------------------------------------------------- |
| void Client::SetTickCallback( |