/// <summary>
 /// Creates a new vertex attribute.
 /// </summary>
 /// <param name="name">The name of the attribute in the shader</param>
 /// <param name="valueCount">The number of components for the value</param>
 /// <param name="type">The data type of the value</param>
 /// <param name="normalized">Indicates whether integer types should be converted to floating point</param>
 /// <exception cref="System.NotImplementedException"><paramref name="type"/> is not an implemented attribute type.</exception>
 public VertexFloatAttribute(string name, ValueCount valueCount, VertexAttribPointerType type, bool normalized = false)
     : base(name, valueCount, type)
 {
     Normalized  = normalized;
     SizeInBytes = (int)valueCount * AttribPointerUtils.GetSizeInBytes(type);
 }
Example #2
0
 /// <summary>
 /// Creates a new vertex attribute.
 /// </summary>
 /// <param name="name">The name of the attribute in the shader</param>
 /// <param name="valueCount">The number of components for the value</param>
 /// <param name="type">The data type of the value</param>
 /// <exception cref="System.NotSupportedException"><paramref name="type"/> is not
 /// a supported attribute type.</exception>
 public VertexIntAttribute(string name, ValueCount valueCount, VertexAttribIntegerType type)
     : base(name, valueCount, (VertexAttribPointerType)type)
 {
     // The default attribute pointer type enum contains all the integer values.
     SizeInBytes = (int)valueCount * AttribPointerUtils.GetSizeInBytes(type);
 }