I'm implementing a 3D engine and after a few techniques I've come to a certain problem, depending on what shader I want to use it'll ask for different uniforms, I have a fairly good design and don't want to ruin it by creating lots of different render() methods with the different setups of uniforms. I thought of making sub-classes of Renderer for each rendering technique (phong, deferred, ssao) but I'm not convinced either. Any idea of a good design that tries to leave Renderer the most generic way possible? Thank you!
Aucun commentaire:
Enregistrer un commentaire