This looks good. Would work well with proposed changes to ShaderProgram.