mirror of https://github.com/axmolengine/axmol.git
fix black screen when back to foreground on android.
This commit is contained in:
parent
beced4897e
commit
f250d24766
|
@ -185,6 +185,11 @@ void ShaderCache::reloadDefaultShaders()
|
|||
p->reset();
|
||||
loadDefaultShader(p, kShaderType_PositionTextureColor);
|
||||
|
||||
// Position Texture Color without MVP shader
|
||||
p = getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP);
|
||||
p->reset();
|
||||
loadDefaultShader(p, kShaderType_PositionTextureColor_noMVP);
|
||||
|
||||
// Position Texture Color alpha test
|
||||
p = getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST);
|
||||
p->reset();
|
||||
|
|
|
@ -65,11 +65,14 @@ Renderer::~Renderer()
|
|||
glDeleteVertexArrays(1, &_quadVAO);
|
||||
GL::bindVAO(0);
|
||||
}
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
NotificationCenter::getInstance()->removeObserver(this, EVNET_COME_TO_FOREGROUND);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Renderer::initGLView()
|
||||
{
|
||||
#if 0//CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// listen the event when app go to background
|
||||
NotificationCenter::getInstance()->addObserver(this,
|
||||
callfuncO_selector(Renderer::onBackToForeground),
|
||||
|
|
Loading…
Reference in New Issue