From: <es...@us...> - 2010-09-08 18:41:03
|
Revision: 2967 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2967&view=rev Author: esuvs Date: 2010-09-08 18:40:56 +0000 (Wed, 08 Sep 2010) Log Message: ----------- Improved Mac support. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/OgreWidget.cpp Modified: trunk/QtOgreFramework/QtOgre/source/OgreWidget.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/OgreWidget.cpp 2010-09-07 02:07:49 UTC (rev 2966) +++ trunk/QtOgreFramework/QtOgre/source/OgreWidget.cpp 2010-09-08 18:40:56 UTC (rev 2967) @@ -55,7 +55,7 @@ //Accept input focus setFocusPolicy(Qt::StrongFocus); - #if defined(Q_WS_WIN) + #if defined(Q_WS_WIN) || defined(Q_WS_MAC) //positive integer for W32 (HWND handle) - According to Ogre Docs externalWindowHandleParams = Ogre::StringConverter::toString((unsigned int)(winId())); #endif @@ -73,7 +73,7 @@ #endif //Add the external window handle parameters to the existing params set. - #if defined(Q_WS_WIN) + #if defined(Q_WS_WIN) || defined(Q_WS_MAC) params["externalWindowHandle"] = externalWindowHandleParams; #endif @@ -81,6 +81,11 @@ params["parentWindowHandle"] = externalWindowHandleParams; #endif + #if defined(Q_WS_MAC) + params["macAPI"] = "cocoa"; + params["macAPICocoaUseNSView"] = "true"; + #endif + //Finally create our window. m_pOgreRenderWindow = Ogre::Root::getSingletonPtr()->createRenderWindow("OgreWindow", width(), height(), false, ¶ms); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |