博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cocos2dx applicationWillEnterForeground 出错
阅读量:4216 次
发布时间:2019-05-26

本文共 520 字,大约阅读时间需要 1 分钟。

问题:

在AppDelegate::applicationWillEnterForeground()代码中显示了一个对话框,结果从后台切换会前台时,出现

call to OpenGL ES API with no current context (logged once per thread)错误。

解决:

Don't call it in AppDelegate::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 totally enter foreground.(摘自网络)

AppDelegate::applicationWillEnterForeground中启动一个定时器,延时一段时间(0.1,具体时间可能需要使用不同手机测试,确定)再显示对话框,结果就可以。

参考:

转载地址:http://yvsmi.baihongyu.com/

你可能感兴趣的文章
Python学习笔记——运维和Shell
查看>>
Python学习笔记——nginx
查看>>
Python学习笔记——自动化部署
查看>>
Python学习笔记——多任务-协程
查看>>
Python学习笔记——WSGI、mini-web框架
查看>>
Python学习笔记——闭包、装饰器
查看>>
Python学习笔记——mini-web框架 添加路由、MySQL功能
查看>>
Python学习笔记——mini-web框架 添加log日志、路由支持正则
查看>>
Python学习笔记——元类、实现ORM
查看>>
Python学习笔记——Celery
查看>>
Python学习笔记——数据分析之Matplotlib绘图
查看>>
Python学习笔记——数据分析之工作环境准备及数据分析建模理论基础
查看>>
Python学习笔记——数据分析之Seaborn绘图
查看>>
Python学习笔记——数据分析之Bokeh绘图
查看>>
Python学习笔记——数据分析之数据可视化工具实战案例:世界高峰数据可视化
查看>>
Python学习笔记——科学计算工具Numpy
查看>>
Python学习笔记——数据分析之数据分析工具Pandas
查看>>
Python学习笔记——Pygame之基础知识
查看>>
Ubuntu 18.04双系统安装教程-超详细(原系统Win7,解决安装完成后启动Ubuntu进入GLUB的问题)
查看>>
Web前端学习笔记——构建前端自动化工作流环境
查看>>