public Content.PrimitiveModel Get(ModelDefinition definition, ModelQuality quality) { var key = Tuple.Create(definition.File.Path, quality); Content.PrimitiveModel primitive; if (_Primitives.TryGetValue(key, out primitive)) return primitive; var mdl = definition.GetModel(quality); primitive = new Content.PrimitiveModel(_Engine.Device, mdl); _Primitives.Add(key, primitive); return primitive; }
public Content.PrimitiveModel Get(ModelDefinition definition, ModelQuality quality) { var key = Tuple.Create(definition.File.Path, quality); Content.PrimitiveModel primitive; if (_Primitives.TryGetValue(key, out primitive)) { return(primitive); } var mdl = definition.GetModel(quality); primitive = new Content.PrimitiveModel(_Engine.Device, mdl); _Primitives.Add(key, primitive); return(primitive); }