将1改成0即可解决
帮助信息:
"Certain Qualcomm Andreno gpu's will retain data in memory after aframe buffer switch which corrupts the render to the texture. Thesolution is to clear the frame buffer before rendering to thetexture. However, calling glClear has the unintended result ofclearing the current texture. Create a temporary texture toovercome this. At the end of CCRenderTexture::begin(), switch theattached texture to the second one, call glClear, and then switchback to the original texture. This solution is unnecessary forother devices as they don't have the same issue with switchingframe buffers."
原文链接:http://blog.sina.com.cn/s/blog_6084f5880101bfcq.html
ps:
这个问题也有可能是应用从后台切到前台时候创建纹理不成功造成的,停一帧就好了。
本文介绍了一个在Android平台使用Cocos2d-x的CCRenderTexture时出现的黑屏问题及其解决方案。该问题可能由应用从后台返回前台时的纹理数据保留导致,通过禁用缓存纹理数据或在渲染前清除帧缓冲区可以解决。
3504

被折叠的 条评论
为什么被折叠?



