C++ Cocos2d Projects
-
Cocos2d
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.
Project mention: How does writing shader source code work for OpenGL ES? | reddit.com/r/opengl | 2022-03-14As others have pointed out, the biggest difference you're seeing is likely due to the _version_ of OpenGL (and hence GLSL) version. That said, there are still important differences. I'd recommend looking at a comparison between the same shader in a project that supports both OpenGL & OpenGLES. For example, here's a shader from cocos2d-x https://github.com/cocos2d/cocos2d-x/blob/v4/cocos/renderer/shaders/positionColor.vert. Note the only difference in this case is the additional precision qualifier (lowp) for v_fragmentColor. Note too how cocos uses preprocessor macros to handle this, so they don't have to maintain separate shader sources. Depending on your goals, you might be interested in tools like Nvidia cg or nvFX that allow for creating shaders in a dialect agnostic way, but ymmv.
C++ Cocos2d related posts
Index
Project | Stars | |
---|---|---|
1 | Cocos2d | 16,343 |
Are you hiring? Post a new remote job listing for free.