public AttributeInfo(string id, string name, GLType type) { Debug.Assert(VariableMaker.GetSupportedTypes().Contains(type)); Id = id; Name = name; Type = type; }
/// <summary> /// Makes new default valued OpenGL variable with that has the type specified by this AttributeInfo. /// </summary> /// <returns>The new OpenGL variable.</returns> public GLVariable CreateNewVariable() { return(VariableMaker.Make(Type)); }
/// <summary> /// Returns all OpenGL types, for which AttributeInfo can be created. /// </summary> public static ICollection <GLType> GetSupportedTypes() { return(VariableMaker.GetSupportedTypes()); }
/// <summary> /// Makes Uniform from a specified GLSL type. /// </summary> /// <param name="type">GLSL type of the uniform. It should be one of the supported ones.</param> /// <param name="name">Name of the new uniform.</param> /// <returns>The newly created uniform.</returns> public static Uniform Make(GLType type, string name) { GLVariable variable = VariableMaker.Make(type); return(new Uniform(name, variable)); }