|
|
@ -10,7 +10,7 @@
|
|
|
|
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
|
|
|
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
|
|
|
#include "osx_utils.h"
|
|
|
|
#include "osx_utils.h"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
bool flag1=false;
|
|
|
|
//bool flag1=false;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SFO
|
|
|
|
namespace SFO
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -49,7 +49,7 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h,
|
|
|
|
case SDL_SYSWM_ANDROID:
|
|
|
|
case SDL_SYSWM_ANDROID:
|
|
|
|
winHandle = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.window);
|
|
|
|
winHandle = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.window);
|
|
|
|
winHandleSurface = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.surface);
|
|
|
|
winHandleSurface = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.surface);
|
|
|
|
flag1=true;
|
|
|
|
// flag1=true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
#elif NOT_ANDROID
|
|
|
|
#elif NOT_ANDROID
|
|
|
@ -70,14 +70,13 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h,
|
|
|
|
|
|
|
|
|
|
|
|
/// \todo externalWindowHandle is deprecated according to the source code. Figure out a way to get parentWindowHandle
|
|
|
|
/// \todo externalWindowHandle is deprecated according to the source code. Figure out a way to get parentWindowHandle
|
|
|
|
/// to work properly. On Linux/X11 it causes an occasional GLXBadDrawable error.
|
|
|
|
/// to work properly. On Linux/X11 it causes an occasional GLXBadDrawable error.
|
|
|
|
if (flag1==false)
|
|
|
|
#ifdef BUILD_ANDROID
|
|
|
|
params.insert(std::make_pair("externalWindowHandle", winHandle));
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
params.insert(std::make_pair("externalWindowHandle", winHandle));
|
|
|
|
params.insert(std::make_pair("externalWindowHandle", winHandle));
|
|
|
|
params.insert(std::make_pair("externalSurface", winHandleSurface));
|
|
|
|
params.insert(std::make_pair("externalSurface", winHandleSurface));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
params.insert(std::make_pair("externalWindowHandle", winHandle));
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mWindow = Ogre::Root::getSingleton().createRenderWindow(title, w, h, fullscreen, ¶ms);
|
|
|
|
mWindow = Ogre::Root::getSingleton().createRenderWindow(title, w, h, fullscreen, ¶ms);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|