destroy all textures on window destruction and restore OpenGL objects when Android resumes the app

This commit is contained in:
2017-04-28 15:06:23 +01:00
parent 96401a1e5d
commit 2e47ccb0c6
12 changed files with 87 additions and 42 deletions

View File

@@ -499,18 +499,16 @@ void App::initLayout()
}
};
LOG("initializing layout xml");
#ifdef _WIN32
//layout.load("C:\\Users\\omar\\Desktop\\new_engine\\data\\layout.xml");
layout.load("data/layout.xml");
#else
layout.load("data/layout.xml");
#endif
if (layout.m_loaded)
layout[main_id]->restore_context();
else
layout.load("data/layout.xml");
LOG("initializing layout completed");
}
void App::initLog()
{
LogRemote::I.start();
//LogRemote::I.start();
}
void App::init()
{
@@ -721,3 +719,8 @@ bool App::key_char(char key)
layout[main_id]->update();
return ret == kEventResult::Consumed;
}
void App::terminate()
{
TextureManager::invalidate();
}