private void TexturesListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { TextureEntry tEntry = TexturesListBox.SelectedValue as TextureEntry; if (tEntry != null) { sampler.Map = tEntry.Map; Render(); } }
private void LoadTexture(string fileName) { TextureEntry tEntry = TextureEntry.Load(fileName); if (tEntry != null) { this.Dispatcher.Invoke(new Action(() => { Textures.Add(tEntry); })); } }