I’m trying to port my old GL shader program to V.4. The doc says:
Create a backend::ProgramState object with
ProgramState(const std::string& vertexShader, const std::string& fragmentShader)
Well, I’m stuck here. I don’t seem to have this constructor. I tried to have a look around cocos to spy how it’s done, but I’ve had no luck in finding examples of loading shaders from files.
What do I do? I must be missing something obvious!
Edit: Should I subclass Program?
Does this mean that my GL shaders will automatically be adapted to Metal without me having to rewrite them?