| 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 24 matching lines...) Expand all Loading... |
| 35 // the GUnit tests | 35 // the GUnit tests |
| 36 | 36 |
| 37 #include <windows.h> | 37 #include <windows.h> |
| 38 #include <Shellapi.h> | 38 #include <Shellapi.h> |
| 39 #include <d3dx9.h> | 39 #include <d3dx9.h> |
| 40 | 40 |
| 41 #include "tests/common/win/testing_common.h" | 41 #include "tests/common/win/testing_common.h" |
| 42 #include "core/cross/install_check.h" | 42 #include "core/cross/install_check.h" |
| 43 #include "core/cross/service_locator.h" | 43 #include "core/cross/service_locator.h" |
| 44 #include "core/cross/evaluation_counter.h" | 44 #include "core/cross/evaluation_counter.h" |
| 45 #include "core/cross/client_info.h" |
| 45 #include "core/cross/class_manager.h" | 46 #include "core/cross/class_manager.h" |
| 46 #include "core/cross/features.h" | 47 #include "core/cross/features.h" |
| 47 #include "core/cross/object_manager.h" | 48 #include "core/cross/object_manager.h" |
| 48 #include "core/cross/profiler.h" | 49 #include "core/cross/profiler.h" |
| 49 #include "core/cross/renderer.h" | 50 #include "core/cross/renderer.h" |
| 50 #include "core/cross/renderer_platform.h" | 51 #include "core/cross/renderer_platform.h" |
| 51 #include "core/cross/types.h" | 52 #include "core/cross/types.h" |
| 52 | 53 |
| 53 o3d::ServiceLocator* g_service_locator = NULL; | 54 o3d::ServiceLocator* g_service_locator = NULL; |
| 54 o3d::DisplayWindow* g_display_window = NULL; | 55 o3d::DisplayWindow* g_display_window = NULL; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 o3d::String program_path_utf8 = WideToUTF8(program_path); | 139 o3d::String program_path_utf8 = WideToUTF8(program_path); |
| 139 o3d::String program_name_utf8 = WideToUTF8(program_name); | 140 o3d::String program_name_utf8 = WideToUTF8(program_name); |
| 140 g_program_path = &program_path_utf8; | 141 g_program_path = &program_path_utf8; |
| 141 g_program_name = &program_name_utf8; | 142 g_program_name = &program_name_utf8; |
| 142 | 143 |
| 143 o3d::ServiceLocator service_locator; | 144 o3d::ServiceLocator service_locator; |
| 144 g_service_locator = &service_locator; | 145 g_service_locator = &service_locator; |
| 145 | 146 |
| 146 o3d::EvaluationCounter evaluation_counter(g_service_locator); | 147 o3d::EvaluationCounter evaluation_counter(g_service_locator); |
| 147 o3d::ClassManager class_manager(g_service_locator); | 148 o3d::ClassManager class_manager(g_service_locator); |
| 149 o3d::ClientInfoManager client_info_manager(g_service_locator); |
| 148 o3d::ObjectManager object_manager(g_service_locator); | 150 o3d::ObjectManager object_manager(g_service_locator); |
| 149 o3d::Profiler profiler(g_service_locator); | 151 o3d::Profiler profiler(g_service_locator); |
| 150 o3d::Features features(g_service_locator); | 152 o3d::Features features(g_service_locator); |
| 151 | 153 |
| 152 // create a renderer device based on the current platform | 154 // create a renderer device based on the current platform |
| 153 g_renderer = o3d::Renderer::CreateDefaultRenderer(g_service_locator); | 155 g_renderer = o3d::Renderer::CreateDefaultRenderer(g_service_locator); |
| 154 | 156 |
| 155 // Initialize the renderer for off-screen rendering if kOffScreenRenderer | 157 // Initialize the renderer for off-screen rendering if kOffScreenRenderer |
| 156 // is in the environment. | 158 // is in the environment. |
| 157 bool success; | 159 bool success; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 delete g_renderer; | 196 delete g_renderer; |
| 195 g_renderer = NULL; | 197 g_renderer = NULL; |
| 196 | 198 |
| 197 delete display_window; | 199 delete display_window; |
| 198 g_display_window = NULL; | 200 g_display_window = NULL; |
| 199 g_program_path = NULL; | 201 g_program_path = NULL; |
| 200 g_program_name = NULL; | 202 g_program_name = NULL; |
| 201 | 203 |
| 202 return ret; | 204 return ret; |
| 203 } | 205 } |
| OLD | NEW |