Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description: This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
This commit is contained in:
@@ -271,6 +271,15 @@ public:
|
||||
*/
|
||||
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
|
||||
const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0;
|
||||
|
||||
/**
|
||||
* Updates the resolution while in fullscreen mode.
|
||||
* @param setting The new setting of the display.
|
||||
* @param window Window displayed in full screen.
|
||||
*
|
||||
* @return Indication of success.
|
||||
*/
|
||||
virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window) = 0;
|
||||
|
||||
/**
|
||||
* Ends full screen mode.
|
||||
|
@@ -168,6 +168,19 @@ GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
|
||||
}
|
||||
|
||||
|
||||
GHOST_TSuccess GHOST_System::updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window)
|
||||
{
|
||||
GHOST_TSuccess success = GHOST_kFailure;
|
||||
GHOST_ASSERT(m_windowManager, "GHOST_System::updateFullScreen(): invalid window manager");
|
||||
if(m_displayManager) {
|
||||
if (m_windowManager->getFullScreen()) {
|
||||
success = m_displayManager->setCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, setting);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_System::endFullScreen(void)
|
||||
{
|
||||
GHOST_TSuccess success = GHOST_kFailure;
|
||||
|
@@ -145,6 +145,15 @@ public:
|
||||
*/
|
||||
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
|
||||
const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0);
|
||||
|
||||
/**
|
||||
* Updates the resolution while in fullscreen mode.
|
||||
* @param setting The new setting of the display.
|
||||
* @param window Window displayed in full screen.
|
||||
*
|
||||
* @return Indication of success.
|
||||
*/
|
||||
virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window);
|
||||
|
||||
/**
|
||||
* Ends full screen mode.
|
||||
|
Reference in New Issue
Block a user