Index: intern/ghost/GHOST_ISystem.h =================================================================== --- intern/ghost/GHOST_ISystem.h (revisão 45091) +++ intern/ghost/GHOST_ISystem.h (cópia de trabalho) @@ -267,10 +267,13 @@ * @param setting The new setting of the display. * @param window Window displayed in full screen. * This window is invalid after full screen has been ended. + * @param multiMonitorSpan Indicates if monitors should span when + * using a multi monitor system. * @return Indication of success. */ virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0; + const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0, + const bool multiMonitorSpan=false) = 0; /** * Updates the resolution while in fullscreen mode. Index: intern/ghost/GHOST_Types.h =================================================================== --- intern/ghost/GHOST_Types.h (revisão 45091) +++ intern/ghost/GHOST_Types.h (cópia de trabalho) @@ -111,11 +111,13 @@ GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateFullScreen, + GHOST_kWindowStateMultiMonitorSpan, GHOST_kWindowStateEmbedded, GHOST_kWindowState8Normal = 8, GHOST_kWindowState8Maximized, GHOST_kWindowState8Minimized, GHOST_kWindowState8FullScreen, + GHOST_kWindowState8MultiMonitorSpan, GHOST_kWindowStateModified, GHOST_kWindowStateUnModified } GHOST_TWindowState; Index: intern/ghost/intern/GHOST_WindowSDL.cpp =================================================================== --- intern/ghost/intern/GHOST_WindowSDL.cpp (revisão 45091) +++ intern/ghost/intern/GHOST_WindowSDL.cpp (cópia de trabalho) @@ -28,6 +28,11 @@ #include "SDL_mouse.h" #include +namespace { + const int FLAGS_WINDOW = SDL_WINDOW_RESIZABLE|SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN; + const int FLAGS_FULLSCREEN = SDL_WINDOW_BORDERLESS|SDL_WINDOW_FULLSCREEN|SDL_WINDOW_OPENGL; +} + static SDL_GLContext s_firstContext= NULL; GHOST_WindowSDL::GHOST_WindowSDL(GHOST_SystemSDL *system, @@ -48,12 +53,19 @@ m_invalid_window(false), m_sdl_custom_cursor(NULL) { + int flags; + + if (GHOST_kWindowStateMultiMonitorSpan == state) + flags = FLAGS_FULLSCREEN; + else + flags = FLAGS_WINDOW; + m_sdl_win= SDL_CreateWindow(title, left, top, width, height, - SDL_WINDOW_RESIZABLE|SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN); + flags); //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); Index: intern/ghost/intern/GHOST_SystemCarbon.h =================================================================== --- intern/ghost/intern/GHOST_SystemCarbon.h (revisão 45091) +++ intern/ghost/intern/GHOST_SystemCarbon.h (cópia de trabalho) @@ -122,7 +122,8 @@ virtual GHOST_TSuccess beginFullScreen( const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual + const bool stereoVisual, + const bool multiMonitorSpan=false ); virtual GHOST_TSuccess endFullScreen( void ); Index: intern/ghost/intern/GHOST_System.cpp =================================================================== --- intern/ghost/intern/GHOST_System.cpp (revisão 45091) +++ intern/ghost/intern/GHOST_System.cpp (cópia de trabalho) @@ -139,7 +139,8 @@ GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples) + const bool stereoVisual, const GHOST_TUns16 numOfAASamples, + const bool multiMonitorSpan) { GHOST_TSuccess success = GHOST_kFailure; GHOST_ASSERT(m_windowManager, "GHOST_System::beginFullScreen(): invalid window manager") @@ -151,7 +152,7 @@ success = m_displayManager->setCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, setting); if (success == GHOST_kSuccess) { //GHOST_PRINT("GHOST_System::beginFullScreen(): creating full-screen window\n"); - success = createFullScreenWindow((GHOST_Window**)window, stereoVisual, numOfAASamples); + success = createFullScreenWindow((GHOST_Window**)window, stereoVisual, numOfAASamples, multiMonitorSpan); if (success == GHOST_kSuccess) { m_windowManager->beginFullScreen(*window, stereoVisual); } @@ -346,7 +347,10 @@ } -GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const bool stereoVisual, const GHOST_TUns16 numOfAASamples) +GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, + const bool stereoVisual, + const GHOST_TUns16 numOfAASamples, + const bool multiMonitorSpan) { GHOST_TSuccess success; GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow(): invalid display manager") @@ -355,10 +359,15 @@ success = m_displayManager->getCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, settings); if (success) { //GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating full-screen window\n"); + + const GHOST_TWindowState state = multiMonitorSpan ? + GHOST_kWindowStateMultiMonitorSpan : + GHOST_kWindowStateFullScreen; + *window = (GHOST_Window*)createWindow( STR_String (""), 0, 0, settings.xPixels, settings.yPixels, - GHOST_kWindowStateFullScreen, + state, GHOST_kDrawingContextTypeOpenGL, stereoVisual, numOfAASamples); Index: intern/ghost/intern/GHOST_SystemCarbon.cpp =================================================================== --- intern/ghost/intern/GHOST_SystemCarbon.cpp (revisão 45091) +++ intern/ghost/intern/GHOST_SystemCarbon.cpp (cópia de trabalho) @@ -435,14 +435,18 @@ return window; } -GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual) +GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen( + const GHOST_DisplaySetting& setting, + GHOST_IWindow** window, + const bool stereoVisual, + const bool multiMonitorSpan) { GHOST_TSuccess success = GHOST_kFailure; // need yo make this Carbon all on 10.5 for fullscreen to work correctly CGCaptureAllDisplays(); - success = GHOST_System::beginFullScreen( setting, window, stereoVisual); + success = GHOST_System::beginFullScreen( setting, window, stereoVisual, multiMonitorSpan ); if( success != GHOST_kSuccess ) { // fullscreen failed for other reasons, release Index: intern/ghost/intern/GHOST_System.h =================================================================== --- intern/ghost/intern/GHOST_System.h (revisão 45091) +++ intern/ghost/intern/GHOST_System.h (cópia de trabalho) @@ -140,11 +140,14 @@ * @param setting The new setting of the display. * @param window Window displayed in full screen. * @param stereoVisual Stereo visual for quad buffered stereo. + * @param multiMonitorSpan Indicates if monitors should span when + * using a multi monitor system. * This window is invalid after full screen has been ended. * @return Indication of success. */ virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0, + const bool multiMonitorSpan=false); /** * Updates the resolution while in fullscreen mode. @@ -321,10 +324,14 @@ /** * Creates a fullscreen window. * @param window The window created. + * @param stereoVisual Stereo visual for quad buffered stereo. + * @param multiMonitorSpan Indicates if monitors should span when + * using a multi monitor system. * @return Indication of success. */ virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0, + const bool multiMonitorSpan=false); /** The display manager (platform dependant). */ GHOST_DisplayManager* m_displayManager; Index: source/gameengine/GamePlayer/ghost/GPG_Application.cpp =================================================================== --- source/gameengine/GamePlayer/ghost/GPG_Application.cpp (revisão 45091) +++ source/gameengine/GamePlayer/ghost/GPG_Application.cpp (cópia de trabalho) @@ -385,7 +385,13 @@ setting.bpp = bpp; setting.frequency = frequency; - fSystem->beginFullScreen(setting, &m_mainWindow, stereoVisual, samples); + fSystem->beginFullScreen( + setting, + &m_mainWindow, + stereoVisual, + samples, + m_multiMonitorSpan); + m_mainWindow->setCursorVisibility(false); m_mainWindow->setState(GHOST_kWindowStateFullScreen); Index: source/gameengine/GamePlayer/ghost/GPG_ghost.cpp =================================================================== --- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (revisão 45091) +++ source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (cópia de trabalho) @@ -213,6 +213,7 @@ printf(" ff = full screen mode frequency\n"); printf(" Note: If fw or fh is defined, both must be defined.\n"); printf(" Also, if fb is used, fw and fh must be used. ff requires all options.\n\n"); + printf(" -m: fullscreen mode with multi monitor span.\n\n"); printf(" -s: start player in stereo\n"); printf(" stereomode: hwpageflip (Quad buffered shutter glasses)\n"); printf(" syncdoubling (Above Below)\n"); @@ -340,6 +341,7 @@ bool error = false; SYS_SystemHandle syshandle = SYS_GetSystem(); bool fullScreen = false; + bool multiMonitorSpan = false; bool fullScreenParFound = false; bool windowParFound = false; #ifdef WIN32 @@ -547,6 +549,12 @@ } } break; + + case 'o': + ++i; + multiMonitorSpan = true; + break; + case 'w': // Parse window position and size options i++; @@ -699,6 +707,12 @@ error = true; printf("error: window size too small.\n"); } + + if (multiMonitorSpan && !fullScreen) + { + error = true; + printf("error: -m option must be used together with -f option.\n"); + } if (error ) { @@ -748,6 +762,8 @@ char pathname[FILE_MAX]; char *titlename; + app.setMultiMonitorSpan(multiMonitorSpan); + get_filename(argc_py_clamped, argv, filename); if(filename[0]) BLI_path_cwd(filename); Index: source/gameengine/GamePlayer/ghost/GPG_Application.h =================================================================== --- source/gameengine/GamePlayer/ghost/GPG_Application.h (revisão 45091) +++ source/gameengine/GamePlayer/ghost/GPG_Application.h (cópia de trabalho) @@ -78,6 +78,11 @@ bool StartGameEngine(int stereoMode); void StopGameEngine(); + void setMultiMonitorSpan(bool multiMonitorSpan) + { + m_multiMonitorSpan = multiMonitorSpan; + } + protected: bool handleWheel(GHOST_IEvent* event); bool handleButton(GHOST_IEvent* event, bool isDown); @@ -163,5 +168,7 @@ /* argc and argv need to be passed on to python */ int m_argc; char** m_argv; + + bool m_multiMonitorSpan; };