GLSL 4.x subroutines

GLSL subroutines allow related function calls to be swapped without the overhead of a switch statement or if/else chain, among other benefits. This code compiles correctly (as long as the glsl version is set to 4.0 or above), but there’s no no way to change the selectedColorType index in TouchDesigner.
[url]https://www.khronos.org/opengl/wiki/Shader_Subroutine[/url]

[code]out vec4 fragColor;

subroutine vec4 colorType();
subroutine uniform colorType selectedColorType;

subroutine (colorType) vec4 redColor() {
return vec4(1.,0.,0.,1.);
}

subroutine (colorType) vec4 blueColor() {
return vec4(0.,0.,1.,1.);
}

void main()
{
vec4 color = selectedColorType();
fragColor = TDOutputSwizzle(color);
}[/code]