大佬教程收集整理的这篇文章主要介绍了cocos2dx applicationWillEnterForeground 出错,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
问题:
在AppDelegate::applicationWillEnterForeg@R_772_7060@)代码中显示了一个对话框,结果从后台切换会前台时,出现
call to OpenGL ES API with no current context (logged once per thread)错误。
解决:
Don't call it inAppDelegate::applicationWillEnterForeground
. Because OpenGL context will be lost when enter to BACkground. At this time OpenGL context may not be re-create by Android system. So,please do the operation after it is @R_638_10586@lly enter foreground.(摘自网络)
在AppDelegate::applicationWillEnterForeground中启动一个定时器,延时一段时间(0.1,具体时间可能需要使用不同手机测试,确定)再显示对话框,结果就可以。
参考:
以上是大佬教程为你收集整理的cocos2dx applicationWillEnterForeground 出错全部内容,希望文章能够帮你解决cocos2dx applicationWillEnterForeground 出错所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。