private void cbLightElements_SelectionChanged(Object sender, SelectionChangedEventArgs e) { var selected = (string)((ComboBoxItem)e.AddedItems[0]).Tag; switch (selected.ToString()) { case "lpImage": _selectedLightPanel = lpImage; break; case "lpAvatar": _selectedLightPanel = lpAvatar; break; } UpdateLightPanel(_selectedLightPanel.SelectedLight); }
private void layoutRoot_Loaded(object sender, RoutedEventArgs e) { //_pipeline = new D3D12Pipeline(); //_pipeline.InitPipeline(Window.Current.CoreWindow, (int)Window.Current.Bounds.Width, (int)Window.Current.Bounds.Height); //DoWorkAsyncInfiniteLoop(_pipeline); _selectedLightPanel = lpImage; settingsPointDiffuse.InitUI(0, 0.75f, 0); settingsSpotlightDiffuse.InitUI(0, 0.75f, 0, 15, 10); settingsSpotlightSpecular.InitUI(.6f, 1, 0, 0, 0, 1, 100, 15, 10); settingsPointSpecular.InitUI(.6f, 1, 0, 0, 0, 1, 100); settingsPointDiffuse.SetLightPanel(ref _selectedLightPanel); settingsDistantDiffuse.InitUI(0, 0.5f, 0); settingsDistantSpecular.InitUI(.6f, 1, 0, 0, 0, 1, 100); }
public void SetLightPanel(ref LightPanel lp) { _lp = lp; }