OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 using std::map; | 63 using std::map; |
64 using std::vector; | 64 using std::vector; |
65 using std::make_pair; | 65 using std::make_pair; |
66 | 66 |
67 namespace o3d { | 67 namespace o3d { |
68 | 68 |
69 // Client constructor. Creates the default root node for the scenegraph | 69 // Client constructor. Creates the default root node for the scenegraph |
70 Client::Client(ServiceLocator* service_locator) | 70 Client::Client(ServiceLocator* service_locator) |
71 : service_locator_(service_locator), | 71 : service_locator_(service_locator), |
72 object_manager_(service_locator), | 72 object_manager_(service_locator), |
73 profiler_(service_locator), | |
74 error_status_(service_locator), | 73 error_status_(service_locator), |
75 draw_list_manager_(service_locator), | 74 draw_list_manager_(service_locator), |
76 counter_manager_(service_locator), | 75 counter_manager_(service_locator), |
77 transformation_context_(service_locator), | 76 transformation_context_(service_locator), |
78 semantic_manager_(service_locator), | 77 semantic_manager_(service_locator), |
| 78 profiler_(service_locator), |
| 79 renderer_(service_locator), |
| 80 evaluation_counter_(service_locator), |
79 rendering_(false), | 81 rendering_(false), |
80 render_tree_called_(false), | 82 render_tree_called_(false), |
81 renderer_(service_locator), | 83 render_mode_(RENDERMODE_CONTINUOUS), |
82 evaluation_counter_(service_locator), | |
83 event_manager_(), | 84 event_manager_(), |
| 85 last_tick_time_(0), |
84 root_(NULL), | 86 root_(NULL), |
85 render_mode_(RENDERMODE_CONTINUOUS), | |
86 last_tick_time_(0), | |
87 #ifdef OS_WIN | 87 #ifdef OS_WIN |
88 calls_(0), | 88 calls_(0), |
89 #endif | 89 #endif |
90 rendergraph_root_(NULL), | 90 rendergraph_root_(NULL), |
91 id_(IdManager::CreateId()) { | 91 id_(IdManager::CreateId()) { |
92 // Create and initialize the message queue to allow external code to | 92 // Create and initialize the message queue to allow external code to |
93 // communicate with the Client via RPC calls. | 93 // communicate with the Client via RPC calls. |
94 message_queue_.reset(new MessageQueue(service_locator_)); | 94 message_queue_.reset(new MessageQueue(service_locator_)); |
95 | 95 |
96 if (!message_queue_->Initialize()) { | 96 if (!message_queue_->Initialize()) { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 } | 437 } |
438 | 438 |
439 String Client::ProfileToString() { | 439 String Client::ProfileToString() { |
440 StringWriter string_writer(StringWriter::LF); | 440 StringWriter string_writer(StringWriter::LF); |
441 JsonWriter json_writer(&string_writer, 2); | 441 JsonWriter json_writer(&string_writer, 2); |
442 profiler_->Write(&json_writer); | 442 profiler_->Write(&json_writer); |
443 json_writer.Close(); | 443 json_writer.Close(); |
444 return string_writer.ToString(); | 444 return string_writer.ToString(); |
445 } | 445 } |
446 } // namespace o3d | 446 } // namespace o3d |
OLD | NEW |