OLD | NEW |
1 /* | 1 /* |
2 * $Id$ | 2 * $Id$ |
3 * ***** BEGIN GPL LICENSE BLOCK ***** | 3 * ***** BEGIN GPL LICENSE BLOCK ***** |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or | 5 * This program is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU General Public License | 6 * modify it under the terms of the GNU General Public License |
7 * as published by the Free Software Foundation; either version 2 | 7 * as published by the Free Software Foundation; either version 2 |
8 * of the License, or (at your option) any later version. | 8 * of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 | 131 |
132 | 132 |
133 bool GHOST_System::validWindow(GHOST_IWindow* window) | 133 bool GHOST_System::validWindow(GHOST_IWindow* window) |
134 { | 134 { |
135 return m_windowManager->getWindowFound(window); | 135 return m_windowManager->getWindowFound(window); |
136 } | 136 } |
137 | 137 |
138 | 138 |
139 GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
, GHOST_IWindow** window, | 139 GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
, GHOST_IWindow** window, |
140 » » » » » » » » » »
» const bool stereoVisual) | 140 » » » » » » » » » »
» const bool stereoVisual, const GHOST_TUns16 numOfAASamples) |
141 { | 141 { |
142 GHOST_TSuccess success = GHOST_kFailure; | 142 GHOST_TSuccess success = GHOST_kFailure; |
143 GHOST_ASSERT(m_windowManager, "GHOST_System::beginFullScreen(): invalid
window manager") | 143 GHOST_ASSERT(m_windowManager, "GHOST_System::beginFullScreen(): invalid
window manager") |
144 if (m_displayManager) { | 144 if (m_displayManager) { |
145 if (!m_windowManager->getFullScreen()) { | 145 if (!m_windowManager->getFullScreen()) { |
146 m_displayManager->getCurrentDisplaySetting(GHOST_Display
Manager::kMainDisplay, m_preFullScreenSetting); | 146 m_displayManager->getCurrentDisplaySetting(GHOST_Display
Manager::kMainDisplay, m_preFullScreenSetting); |
147 | 147 |
148 //GHOST_PRINT("GHOST_System::beginFullScreen(): activati
ng new display settings\n"); | 148 //GHOST_PRINT("GHOST_System::beginFullScreen(): activati
ng new display settings\n"); |
149 success = m_displayManager->setCurrentDisplaySetting(GHO
ST_DisplayManager::kMainDisplay, setting); | 149 success = m_displayManager->setCurrentDisplaySetting(GHO
ST_DisplayManager::kMainDisplay, setting); |
150 if (success == GHOST_kSuccess) { | 150 if (success == GHOST_kSuccess) { |
151 //GHOST_PRINT("GHOST_System::beginFullScreen():
creating full-screen window\n"); | 151 //GHOST_PRINT("GHOST_System::beginFullScreen():
creating full-screen window\n"); |
152 » » » » success = createFullScreenWindow((GHOST_Window**
)window, stereoVisual); | 152 » » » » success = createFullScreenWindow((GHOST_Window**
)window, stereoVisual, numOfAASamples); |
153 if (success == GHOST_kSuccess) { | 153 if (success == GHOST_kSuccess) { |
154 m_windowManager->beginFullScreen(*window
, stereoVisual); | 154 m_windowManager->beginFullScreen(*window
, stereoVisual); |
155 } | 155 } |
156 else { | 156 else { |
157 m_displayManager->setCurrentDisplaySetti
ng(GHOST_DisplayManager::kMainDisplay, m_preFullScreenSetting); | 157 m_displayManager->setCurrentDisplaySetti
ng(GHOST_DisplayManager::kMainDisplay, m_preFullScreenSetting); |
158 } | 158 } |
159 } | 159 } |
160 } | 160 } |
161 } | 161 } |
162 if (success == GHOST_kFailure) { | 162 if (success == GHOST_kFailure) { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 #ifdef WITH_INPUT_NDOF | 324 #ifdef WITH_INPUT_NDOF |
325 if (m_ndofManager) { | 325 if (m_ndofManager) { |
326 delete m_ndofManager; | 326 delete m_ndofManager; |
327 m_ndofManager = 0; | 327 m_ndofManager = 0; |
328 } | 328 } |
329 #endif | 329 #endif |
330 return GHOST_kSuccess; | 330 return GHOST_kSuccess; |
331 } | 331 } |
332 | 332 |
333 | 333 |
334 GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const
bool stereoVisual) | 334 GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const
bool stereoVisual, const GHOST_TUns16 numOfAASamples) |
335 { | 335 { |
336 GHOST_TSuccess success; | 336 GHOST_TSuccess success; |
337 GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow():
invalid display manager") | 337 GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow():
invalid display manager") |
338 GHOST_DisplaySetting settings; | 338 GHOST_DisplaySetting settings; |
339 | 339 |
340 success = m_displayManager->getCurrentDisplaySetting(GHOST_DisplayManage
r::kMainDisplay, settings); | 340 success = m_displayManager->getCurrentDisplaySetting(GHOST_DisplayManage
r::kMainDisplay, settings); |
341 if (success) { | 341 if (success) { |
342 //GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating
full-screen window\n"); | 342 //GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating
full-screen window\n"); |
343 *window = (GHOST_Window*)createWindow( | 343 *window = (GHOST_Window*)createWindow( |
344 STR_String (""), | 344 STR_String (""), |
345 0, 0, settings.xPixels, settings.yPixels
, | 345 0, 0, settings.xPixels, settings.yPixels
, |
346 GHOST_kWindowStateFullScreen, | 346 GHOST_kWindowStateFullScreen, |
347 GHOST_kDrawingContextTypeOpenGL, | 347 GHOST_kDrawingContextTypeOpenGL, |
348 » » » » » stereoVisual); | 348 » » » » » stereoVisual, |
| 349 » » » » » numOfAASamples); |
349 success = *window == 0 ? GHOST_kFailure : GHOST_kSuccess; | 350 success = *window == 0 ? GHOST_kFailure : GHOST_kSuccess; |
350 } | 351 } |
351 return success; | 352 return success; |
352 } | 353 } |
OLD | NEW |