| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // Contains macintosh-specific code for setting up the Client object | 33 // Contains macintosh-specific code for setting up the Client object |
| 34 // used in the unit tests. | 34 // used in the unit tests. |
| 35 | 35 |
| 36 #include <OpenGL/OpenGL.h> | 36 #include <OpenGL/OpenGL.h> |
| 37 #include <OpenGL/gl.h> | 37 #include <OpenGL/gl.h> |
| 38 #include <OpenGL/glu.h> | 38 #include <OpenGL/glu.h> |
| 39 #include <GLUT/glut.h> | 39 #include <GLUT/glut.h> |
| 40 #include <AGL/agl.h> | 40 #include <AGL/agl.h> |
| 41 | 41 |
| 42 #include "core/cross/client_info.h" |
| 42 #include "core/cross/class_manager.h" | 43 #include "core/cross/class_manager.h" |
| 43 #include "core/cross/evaluation_counter.h" | 44 #include "core/cross/evaluation_counter.h" |
| 44 #include "core/cross/install_check.h" | 45 #include "core/cross/install_check.h" |
| 45 #include "core/cross/features.h" | 46 #include "core/cross/features.h" |
| 46 #include "core/cross/object_manager.h" | 47 #include "core/cross/object_manager.h" |
| 47 #include "core/cross/profiler.h" | 48 #include "core/cross/profiler.h" |
| 48 #include "core/cross/renderer.h" | 49 #include "core/cross/renderer.h" |
| 49 #include "core/cross/renderer_platform.h" | 50 #include "core/cross/renderer_platform.h" |
| 50 #include "core/cross/service_locator.h" | 51 #include "core/cross/service_locator.h" |
| 51 #include "core/cross/types.h" | 52 #include "core/cross/types.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 86 } |
| 86 | 87 |
| 87 g_program_path = &program_path; | 88 g_program_path = &program_path; |
| 88 g_program_name = &program_name; | 89 g_program_name = &program_name; |
| 89 | 90 |
| 90 o3d::ServiceLocator service_locator; | 91 o3d::ServiceLocator service_locator; |
| 91 g_service_locator = &service_locator; | 92 g_service_locator = &service_locator; |
| 92 | 93 |
| 93 o3d::EvaluationCounter evaluation_counter(g_service_locator); | 94 o3d::EvaluationCounter evaluation_counter(g_service_locator); |
| 94 o3d::ClassManager class_manager(g_service_locator); | 95 o3d::ClassManager class_manager(g_service_locator); |
| 96 o3d::ClientInfoManager client_info_manager(g_service_locator); |
| 95 o3d::ObjectManager object_manager(g_service_locator); | 97 o3d::ObjectManager object_manager(g_service_locator); |
| 96 o3d::Profiler profiler(g_service_locator); | 98 o3d::Profiler profiler(g_service_locator); |
| 97 o3d::Features features(g_service_locator); | 99 o3d::Features features(g_service_locator); |
| 98 | 100 |
| 99 // create a renderer device based on the current platform | 101 // create a renderer device based on the current platform |
| 100 g_renderer = o3d::Renderer::CreateDefaultRenderer(g_service_locator); | 102 g_renderer = o3d::Renderer::CreateDefaultRenderer(g_service_locator); |
| 101 | 103 |
| 102 glutInit(&argc, argv); | 104 glutInit(&argc, argv); |
| 103 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL); | 105 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL); |
| 104 glutInitWindowSize(kWindowWidth, kWindowHeight); | 106 glutInitWindowSize(kWindowWidth, kWindowHeight); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 125 delete g_renderer; | 127 delete g_renderer; |
| 126 g_renderer = NULL; | 128 g_renderer = NULL; |
| 127 | 129 |
| 128 delete display_window; | 130 delete display_window; |
| 129 g_display_window = NULL; | 131 g_display_window = NULL; |
| 130 g_program_path = NULL; | 132 g_program_path = NULL; |
| 131 g_program_name = NULL; | 133 g_program_name = NULL; |
| 132 | 134 |
| 133 return ret; | 135 return ret; |
| 134 } | 136 } |
| OLD | NEW |