Beispiel #1
0
        public RenderStateMap Clone()
        {
            RenderStateMap clone = new RenderStateMap();

            foreach (KeyValuePair <String, RenderStateRecord[]> kv in _map)
            {
                clone._map.Add(kv.Key, (RenderStateRecord[])kv.Value.Clone());
            }
            clone._activeRecords       = clone._map[_activeTechniqueName];
            clone._activeTechniqueName = _activeTechniqueName;
            return(clone);
        }
Beispiel #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());
        }