Exemplo n.º 1
0
        public AttributeInfo(string id, string name, GLType type)
        {
            Debug.Assert(VariableMaker.GetSupportedTypes().Contains(type));

            Id   = id;
            Name = name;
            Type = type;
        }
Exemplo n.º 2
0
 /// <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));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns all OpenGL types, for which AttributeInfo can be created.
 /// </summary>
 public static ICollection <GLType> GetSupportedTypes()
 {
     return(VariableMaker.GetSupportedTypes());
 }
Exemplo n.º 4
0
        /// <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));
        }