GHOST_IWindow* GHOST_SystemWin32::createWindow( const STR_String& title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type, bool stereoVisual, const GHOST_TUns16 numOfAASamples, const GHOST_TEmbedderWindowID parentWindow ) { GHOST_Window* window = 0; window = new GHOST_WindowWin32 (this, title, left, top, width, height, state, type, stereoVisual, numOfAASamples); if (window) { if (window->getValid()) { // Store the pointer to the window // if (state != GHOST_kWindowStateFullScreen) { m_windowManager->addWindow(window); // } } else { // An invalid window could be one that was used to test for AA window = ((GHOST_WindowWin32*)window)->getNextWindow(); // If another window is found, let the wm know about that one, but not the old one if (window->getValid()) { m_windowManager->addWindow(window); } else { delete window; window = 0; } } } return window; }
GHOST_IWindow *GHOST_SystemWin32::createWindow( const STR_String &title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type, bool wantStereoVisual, const bool exclusive, const GHOST_TUns16 wantNumOfAASamples, const GHOST_TEmbedderWindowID parentWindow) { GHOST_Window *window = new GHOST_WindowWin32( this, title, left, top, width, height, state, type, wantStereoVisual, wantNumOfAASamples, parentWindow); if (window->getValid()) { // Store the pointer to the window m_windowManager->addWindow(window); m_windowManager->setActiveWindow(window); } else { GHOST_PRINT("GHOST_SystemWin32::createWindow(): window invalid\n"); delete window; window = 0; } return window; }