Hi All
My render order is
1) bind VAO and shader
2) Set attributes and uniforms
3) call glDrawElements
4) disable attributes and release shader & VAO
Unfortunately I need different shaders for different primitives in glDrawElements. It's guaranteed all attributes & uniforms are exactly same for all shaders. How can I avoid re-setup (point 2 above)? Uniforms is not a big prob, anyway I've a map for them. But will attributes work? Maybe need to specify same “location” in all shaders? And what to do with element buffer? Experimented, for now no errors but nor render ;-)
Thank you