Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
Looking into GLProgramCache::loadDefaultGLPrograms() & GLProgramCache::reloadDefaultGLPrograms() (which is called when the renderer is recreated on Android), there are some shaders which are not necessary for certain use cases (not all apps use 3D / CCDrawNode / distance field etc.) and they are always initialized regardless. Compiling shaders and linking them are quite slow, is there any plan to move the shader initialization to the initialization of each related component?
(originally from http://discuss.cocos2d-x.org/t/lazy-initialization-of-shader-programs-in-glprogramcache/29306/1)
Looking into GLProgramCache::loadDefaultGLPrograms() & GLProgramCache::reloadDefaultGLPrograms() (which is called when the renderer is recreated on Android), there are some shaders which are not necessary for certain use cases (not all apps use 3D / CCDrawNode / distance field etc.) and they are always initialized regardless. Compiling shaders and linking them are quite slow, is there any plan to move the shader initialization to the initialization of each related component?