destroy all textures on window destruction and restore OpenGL objects when Android resumes the app
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user