Cocos2D 2.0 OpenGL errors?

只谈情不闲聊 提交于 2019-12-30 15:00:22

问题


In my app it was working fine in Cocos2D version 1.1. When I upgraded to 2.0rc0a, I just see a black screen now and I get the following 4 errors nonstop until I quit the application:

OpenGL error 0x0506 in -[CCSprite draw] 532
OpenGL error 0x0506 in -[CCParticleSystemQuad draw] 461
OpenGL error 0x0506 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 543
OpenGL error 0x0506 in -[CCGLView swapBuffers] 280

So I googled this a bit and it seems that the app cannot find the shader files. What shader files? Is there a specific name or is it ALL Cocos2D files?

Also how would I fix this issue? I currently have no warnings or errors in my project.

Thanks!


回答1:


The shader files are now header files (.h), in previous beta versions they were resource files (.vsh/.fsh).

I suppose that you did not add these newly added cocos2d files to your project. When upgrading cocos2d in an existing project, always delete the entire cocos2d folder and replace it with the new one, then remove any missing (red) files in Xcode and also add any new files that might have been added.



来源:https://stackoverflow.com/questions/9914914/cocos2d-2-0-opengl-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!