Exemple #1
0
        /// <summary>
        /// Clones this instance.
        /// </summary>
        /// <returns></returns>
        public MaterialSamplerStateCollection Clone()
        {
            MaterialSamplerStateCollection ssc = new MaterialSamplerStateCollection(_samplers.Length, _isVertex);

            Array.Copy(_samplers, ssc._samplers, _samplers.Length);
            return(ssc);
        }
Exemple #2
0
        public Material(String name)
        {
            _name = name;
            _cachedEngineParameters = new Dictionary <String, MaterialEngineParameter>();
            _cachedParameters       = new Dictionary <String, MaterialParameter>();
            _materialLogic          = new Dictionary <String, IMaterialLogic>();
            _renderStateMap         = new RenderStateMap();
            _pixelSamplers          = new MaterialSamplerStateCollection(16, false);
            _vertexSamplers         = new MaterialSamplerStateCollection(4, true);

            this.AddLogic(new LightLogic());
        }