Merge pull request #7458 from MSOpenTech/wp8-v3-fix

updated cpp template to support EVENT_RENDERER_RECREATED
This commit is contained in:
minggo 2014-07-15 23:02:28 +08:00
commit e431d4f824
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ void Cocos2dRenderer::CreateGLResources()
cocos2d::ShaderCache::getInstance()->reloadDefaultGLPrograms(); cocos2d::ShaderCache::getInstance()->reloadDefaultGLPrograms();
cocos2d::DrawPrimitives::init(); cocos2d::DrawPrimitives::init();
cocos2d::VolatileTextureMgr::reloadAllTextures(); cocos2d::VolatileTextureMgr::reloadAllTextures();
cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED);
director->getEventDispatcher()->dispatchEvent(&foregroundEvent); director->getEventDispatcher()->dispatchEvent(&recreatedEvent);
cocos2d::Application::getInstance()->applicationWillEnterForeground(); cocos2d::Application::getInstance()->applicationWillEnterForeground();
director->setGLDefaultValues(); director->setGLDefaultValues();
} }