public FieldDescriptor(string tag, string name, string define, string type, string semantic = "", string preprocessor = "", StructFieldOptions subscriptOptions = StructFieldOptions.Static) { this.tag = tag; this.name = name; this.define = define; this.type = type; this.vectorCount = 0; this.semantic = semantic; this.preprocessor = preprocessor; this.subscriptOptions = subscriptOptions; }
public FieldDescriptor(string tag, string name, string define, ShaderValueType type, string semantic = "", string preprocessor = "", StructFieldOptions subscriptOptions = StructFieldOptions.Static, string interpolation = "") { this.tag = tag; this.name = name; this.define = define; this.type = type.ToShaderString(); this.vectorCount = type.GetVectorCount(); this.semantic = semantic; this.preprocessor = preprocessor; this.interpolation = interpolation; this.subscriptOptions = subscriptOptions; }
public static bool HasFlag(this FieldDescriptor descriptor, StructFieldOptions options) { return((descriptor.subscriptOptions & options) == options); }