public static VertexAttribute Parse(XElement xElement) { string nameInShader = xElement.Attribute(strNameInShader).Value; string nameInModel = xElement.Attribute(strNameInModel).Value; string attributeType = xElement.Attribute(strAttributeType).Value; var result = new VertexAttribute(nameInShader, nameInModel, attributeType); return result; }
public static VertexAttribute Parse(XElement xElement) { string nameInShader = xElement.Attribute(strNameInShader).Value; string nameInModel = xElement.Attribute(strNameInModel).Value; string attributeType = xElement.Attribute(strAttributeType).Value; var result = new VertexAttribute(nameInShader, nameInModel, attributeType); return(result); }
public static DataStructure Parse(XElement xElement) { string targetName = xElement.Attribute(strTargetName).Value; bool zeroIndexBuffer = bool.Parse(xElement.Attribute(strZeroIndexBuffer).Value); DrawMode mode = (DrawMode)Enum.Parse(typeof(DrawMode), xElement.Attribute(strDrawMode).Value); var result = new DataStructure(); result.TargetName = targetName; result.ZeroIndexBuffer = zeroIndexBuffer; result.DrawMode = mode; foreach (var item in xElement.Elements(VertexAttribute.strVertexAttribute)) { VertexAttribute property = VertexAttribute.Parse(item); result.propertyList.Add(property); } return(result); }