def glsl_file_type_value(op):
    """Gets file type value for given file type."""
    if op == "vertex":
        return 0
    elif op == "geometry":
        return 1
    elif op == "fragment":
        return 2
    raise RuntimeError("unknown GLSL file type: %s" % (op))