Rework how appropriate uniform function is chosen.

Use the actual OpenGL type we already have instead
of trying to guess for the data shape.