From 964e42ab02712706ea9b328674d944d2581548a0 Mon Sep 17 00:00:00 2001 From: sylar Date: Sat, 11 Oct 2014 21:21:23 +0400 Subject: [PATCH] fixes errors in connecting Sdl and Ogre for nvidia tegra3 and in theory for other devices based on android --- extern/sdl4ogre/sdlwindowhelper.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extern/sdl4ogre/sdlwindowhelper.cpp b/extern/sdl4ogre/sdlwindowhelper.cpp index e040b8868..44993947f 100644 --- a/extern/sdl4ogre/sdlwindowhelper.cpp +++ b/extern/sdl4ogre/sdlwindowhelper.cpp @@ -27,7 +27,6 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h, throw std::runtime_error("Couldn't get WM Info!"); Ogre::String winHandle; - Ogre::String winHandleSurface; switch (wmInfo.subsystem) { @@ -46,8 +45,6 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h, #elif ANDROID case SDL_SYSWM_ANDROID: winHandle = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.window); - winHandleSurface = Ogre::StringConverter::toString((unsigned long)wmInfo.info.android.surface); - break; #else case SDL_SYSWM_X11: @@ -63,7 +60,8 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h, /// to work properly. On Linux/X11 it causes an occasional GLXBadDrawable error. #ifdef ANDROID - params.insert(std::make_pair("externalSurface", winHandleSurface)); + SDL_GLContext context= SDL_GL_CreateContext(window); + params.insert(std::make_pair("currentGLContext","True")); #endif params.insert(std::make_pair("externalWindowHandle", winHandle));