Our great sponsors
-
LearnOpenGL
Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
-
Cocos2d
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.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I found this in learnopengl.com
As 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.
Related posts
- Decrypt key and signature
- Unreal for 2D game?
- Still have nothing to do with VS Code - WHAT SHOULD I DO WITH IT IN TERMS OF MAKING THINGS THAT ARE RELEVANT TO MAKING AN RPG MAKER MV GAME, NOT JUST EDITING NORMAL TEXT!? + DOES USING VS CODE WITH BASIC THINGS IN GITHUB WORTH IT?
- Lessons from Open-Source Game Projects
- Alternative Game Engines for Marooned Unity Developers