I’m developing a game which uses some basic shaders (grayscale i.e.). It works as a charm in iOS (in fact the app has been already sent to App Store reviewers), but in Android we have faced a problem than cannot solve:
Everything goes well except if the user pushes the Home Button and later enters again to the app; the shaders doesn’t work well in this situation. I’ve tried to find info about this problem, but the only thing I’ve seen is this thread: http://www.cocos2d-x.org/boards/6/topics/6197
Here Danil Valmar says that the solution is to reload Shaders:
joseph pinkasfeld and Le Yang can you post full solution for cocos2dx v2.0.3? Current problem also cause shader programs. It is easy to reload shaders, but for me redrawing all rendertextures is not that simply.
But I don’t know how to do this. I’ve tried everything and the app always crashes with the message “Failed to compile shaders” if I try to reload my custom shaders on “applicationWillEnterForeground”.
Can anyone help me please??
Thanks in advance!