public override object Clone()
        {
            VertexShaderFieldList list = new VertexShaderFieldList();
            foreach (var item in this)
            {
                list.Add(item.Clone() as ShaderField);
            }

            return list;
        }
示例#2
0
        public override object Clone()
        {
            VertexShaderFieldList list = new VertexShaderFieldList();

            foreach (var item in this)
            {
                list.Add(item.Clone() as ShaderField);
            }

            return(list);
        }
        internal static VertexShaderFieldList Parse(System.Xml.Linq.XElement xElement)
        {
            if (xElement.Name != typeof(VertexShaderFieldList).Name) { throw new Exception(); }

            var result = new VertexShaderFieldList();
            foreach (var item in xElement.Elements(typeof(ShaderField).Name))
            {
                result.Add(ShaderField.Parse(item));
            }

            return result;
        }
示例#4
0
        internal static VertexShaderFieldList Parse(System.Xml.Linq.XElement xElement)
        {
            if (xElement.Name != typeof(VertexShaderFieldList).Name)
            {
                throw new Exception();
            }

            var result = new VertexShaderFieldList();

            foreach (var item in xElement.Elements(typeof(ShaderField).Name))
            {
                result.Add(ShaderField.Parse(item));
            }

            return(result);
        }
示例#5
0
        internal static CSSLTemplate Load(string fullname)
        {
            XElement element = XElement.Load(fullname);

            if (element.Name != typeof(CSSLTemplate).Name)
            {
                throw new Exception();
            }

            CSSLTemplate result = new CSSLTemplate();

            result.ShaderName  = element.Attribute(strShaderName).Value;
            result.ProgramType = (ShaderProgramType)Enum.Parse(
                typeof(ShaderProgramType), element.Attribute(strProgramType).Value);
            result.VertexShaderFieldList   = VertexShaderFieldList.Parse(element.Element(typeof(VertexShaderFieldList).Name));
            result.GeometryShaderFieldList = GeometryShaderFieldList.Parse(element.Element(typeof(GeometryShaderFieldList).Name));
            result.FragmentShaderFieldList = FragmentShaderFieldList.Parse(element.Element(typeof(FragmentShaderFieldList).Name));
            result.StrutureList            = IntermediateStructureList.Parse(element.Element(typeof(IntermediateStructureList).Name));

            result.Fullname = fullname;

            return(result);
        }