Does this reset the currently used program to 0 when fixed function is supposed to be used again?
I think we should just do glUseProgramObjectARB(programId), since when fixed function is supposed to be used the program id will be 0. That also mean you don't have to do an explicit glUseProgramObjectARB(0) at a later stage, which saves an extra shader switch, in particular if the same shader is used in the next DrawPrimitive call.