/// <summary>
 ///
 /// </summary>
 /// <param name="vertexArrayType"></param>
 public ArrayBufferItemAttribute(ArrayBufferItemType vertexArrayType)
 {
     ArrayType     = vertexArrayType;
     ArrayBaseType = vertexArrayType.GetVertexBaseType();
     ArrayLength   = vertexArrayType.GetArrayLength();
     ArrayRank     = vertexArrayType.GetArrayRank();
 }
        /// <summary>
        /// Get the size of a vertex array buffer item, in bytes.
        /// </summary>
        /// <param name="vertexArrayType">
        /// A <see cref="ArrayBufferItemType"/> that describe the vertex array buffer item.
        /// </param>
        /// <returns>
        /// It returns the size of the vertex array buffer type having the type <paramref name="vertexArrayType"/>, in bytes.
        /// </returns>
        public static uint GetItemSize(this ArrayBufferItemType vertexArrayType)
        {
            uint baseTypeSize = vertexArrayType.GetVertexBaseType().GetSize();
            uint length       = vertexArrayType.GetArrayLength();
            uint rank         = vertexArrayType.GetArrayRank();

            return(baseTypeSize * length * rank);
        }
 /// <summary>
 /// Get whether a <see cref="ArrayBufferItemType"/> is a vector type (vec2, vec3, ...).
 /// </summary>
 /// <param name="vertexArrayType">
 /// A <see cref="ArrayBufferItemType"/> that describe the vertex array buffer item.
 /// </param>
 /// <returns>
 /// It returns a boolean value indicating whether <paramref name="vertexArrayType"/> is a vector type.
 /// </returns>
 public static bool IsArrayVectorType(this ArrayBufferItemType vertexArrayType)
 {
     return((vertexArrayType.GetArrayLength() > 1) && (vertexArrayType.GetArrayRank() == 1));
 }
 /// <summary>
 /// Get whether a <see cref="ArrayBufferItemType"/> is a simple type (float, int, ...).
 /// </summary>
 /// <param name="vertexArrayType">
 /// A <see cref="ArrayBufferItemType"/> that describe the vertex array buffer item.
 /// </param>
 /// <returns>
 /// It returns a boolean value indicating whether <paramref name="vertexArrayType"/> is a simple type.
 /// </returns>
 public static bool IsArraySimpleType(this ArrayBufferItemType vertexArrayType)
 {
     return(vertexArrayType.GetArrayLength() == 1 && vertexArrayType.GetArrayRank() == 1);
 }