| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 // Initialize the renderer for off-screen rendering if kOffScreenRenderer | 155 // Initialize the renderer for off-screen rendering if kOffScreenRenderer |
| 156 // is in the environment. | 156 // is in the environment. |
| 157 bool success; | 157 bool success; |
| 158 o3d::DisplayWindowWindows* display_window = | 158 o3d::DisplayWindowWindows* display_window = |
| 159 new o3d::DisplayWindowWindows(); | 159 new o3d::DisplayWindowWindows(); |
| 160 display_window = display_window; | 160 display_window = display_window; |
| 161 display_window->set_hwnd(g_window_handle); | 161 display_window->set_hwnd(g_window_handle); |
| 162 g_display_window = display_window; | 162 g_display_window = display_window; |
| 163 bool offscreen = (::GetEnvironmentVariableW(kOffScreenRenderer, | 163 bool offscreen = (::GetEnvironmentVariableW(kOffScreenRenderer, |
| 164 NULL, 0) == 0); | 164 NULL, 0) != 0); |
| 165 if (offscreen) { | 165 if (offscreen) { |
| 166 success = | 166 success = |
| 167 g_renderer->Init(*g_display_window, true) == o3d::Renderer::SUCCESS; | 167 g_renderer->Init(*g_display_window, true) == o3d::Renderer::SUCCESS; |
| 168 } else { | 168 } else { |
| 169 success = | 169 success = |
| 170 g_renderer->Init(*g_display_window, false) == o3d::Renderer::SUCCESS; | 170 g_renderer->Init(*g_display_window, false) == o3d::Renderer::SUCCESS; |
| 171 if (success) { | 171 if (success) { |
| 172 ::SetWindowPos(g_window_handle, HWND_TOPMOST, 0, 0, 0, 0, | 172 ::SetWindowPos(g_window_handle, HWND_TOPMOST, 0, 0, 0, 0, |
| 173 SWP_NOMOVE | SWP_NOSIZE); | 173 SWP_NOMOVE | SWP_NOSIZE); |
| 174 ::ShowWindow(g_window_handle, SW_SHOWNORMAL); | 174 ::ShowWindow(g_window_handle, SW_SHOWNORMAL); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 194 delete g_renderer; | 194 delete g_renderer; |
| 195 g_renderer = NULL; | 195 g_renderer = NULL; |
| 196 | 196 |
| 197 delete display_window; | 197 delete display_window; |
| 198 g_display_window = NULL; | 198 g_display_window = NULL; |
| 199 g_program_path = NULL; | 199 g_program_path = NULL; |
| 200 g_program_name = NULL; | 200 g_program_name = NULL; |
| 201 | 201 |
| 202 return ret; | 202 return ret; |
| 203 } | 203 } |
| OLD | NEW |