So, I've been working extensively with NVidia's CG, but I'm happy to see that GLSL has come as far as it has in terms of driver support. With ATI cards' lackluster performance using CG, I'm adding GLSL support for non NVidia cards.
My question is this: Using CG, it is not necessary to link vertex shaders and fragment shaders - you just bind both when you need them. This was really useful for applications that need to mix and match a large number of vertex shaders with a large number of fragment shaders. In my case, I have about ten vertex shaders and five fragment shaders. With CG, I never have to link (it happens implicitly when binding the shaders).
With GLSL, it seems I have two options.
1. during initialization, link and store programs for every combination of vertex/fragment shader == 50 programs total
2. link vertex and fragment programs on the fly, right before I use them.
Which option would be best, or am I missing a third? It seems that both might be bad for performance, but I haven't done any testing. The second option sucks, as I'd have to grab all attributes and variables after each link.
I really think I'm missing something here. Any ideas?