I am rewriting a program right now to use VBOs instead of glBegin/glEnd. Before, I used uniforms for my textures, but now I can not define uniforms for specific triangles but only for the whole render. Attriutes also do not work, because I would have to pass the sampler2D’s to the Fragment Shader using varyings and that does not work.
So how should I do it?