Generalized the shader program loader