在android 中使用CCRenderTexture发现一个bug,

当任务从前台切换到后台,再从后台切换到前台时 CCRenderTexture渲染的对象会变成黑色。 修正: 在CCPlatformMacros.h中找到

#define CC_ENABLE_CACHE_TEXTURE_DATA 1

将1改成0即可解决

帮助信息:

"Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of CCRenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers."

更多相关文章

  1. Android获取前台进程包名
  2. android 后台长时间执行周期性定时任务 解决方案收集
  3. android后台运行服务,加验证
  4. android以后台service的方式获取GPRS数据
  5. android本地后台服务示例
  6. 截取android正在播放音乐的audio音频流(后台获取android音频流)
  7. 自己写的一套应用管理系统(包含一套app系统,一套后台web管理系统《
  8. android后台服务service全解析(上)--service的使用与本地通信

随机推荐

  1. Android(安卓)Binder实现浅析-Binder驱动
  2. Android原生(Native)C开发之二 framebuff
  3. Android使用WebView加载文字总结之中文乱
  4. adb、sqlite3在命令行下访问应用数据库
  5. Android(安卓)导入工程出现 unable to ge
  6. android sdk 文档导读之一:android 如何绘
  7. 界面编程之基本界面组件(6)AnalogClock 和
  8. Android如何正确的保存文件
  9. Android性能优化案例研究
  10. android最佳学习路线,学习心得