示例#1
0
        public MaterialParameter(EffectParameter parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter");
            }
            if (string.IsNullOrEmpty(parameter.Semantic))
            {
                throw new ArgumentException("Material parameters must have a semantic");
            }

            this.Parameter = parameter;
            this.setter    = CreateSetter(parameter);
        }
示例#2
0
        public MaterialParameter(EffectParameter parameter)
        {
            if (parameter == null)
                throw new ArgumentNullException("parameter");
            if (string.IsNullOrEmpty(parameter.Semantic))
                throw new ArgumentException("Material parameters must have a semantic");

            _parameter = parameter;
            _setter = CreateSetter(parameter);
        }