private void SessionSection_ViewportSettingsReceived(object sender, ViewportSettingsReceivedEventArgs e)
 {
     if (e.ViewportSettings != null)
     {
         UnRegisterControlEvents();
         m_samples.Value    = e.ViewportSettings.Samples;
         m_throttlems.Value = e.ViewportSettings.ThrottleMs;
         RegisterControlEvents();
     }
 }
Esempio n. 2
0
 private void DeviceSection_ViewportSettingsReceived(object sender, ViewportSettingsReceivedEventArgs e)
 {
     if (e.ViewportSettings != null)
     {
         m_currentDevice = RcCore.It.EngineSettings.RenderDevice;
         m_newDevice     = ccl.Device.DeviceFromString(ccl.Device.ValidDeviceString(e.ViewportSettings.SelectedDeviceStr));
         SuspendLayout();
         UnRegisterControlEvents();
         ShowDeviceData();
         SetupDeviceData(e.ViewportSettings, m_tabpage_cpu.Collection, ccl.DeviceType.CPU);
         SetupDeviceData(e.ViewportSettings, m_tabpage_cuda.Collection, ccl.DeviceType.CUDA);
         SetupDeviceData(e.ViewportSettings, m_tabpage_opencl.Collection, ccl.DeviceType.OpenCL);
         ActivateDevicePage(e.ViewportSettings);
         RegisterControlEvents();
         ResumeLayout();
     }
 }
Esempio n. 3
0
 private void IntegratorSection_ViewportSettingsReceived(object sender, ViewportSettingsReceivedEventArgs e)
 {
     if (e.ViewportSettings != null)
     {
         UnregisterControlEvents();
         m_seed.Value                  = e.ViewportSettings.Seed;
         m_diffusesamples.Value        = e.ViewportSettings.DiffuseSamples;
         m_glossysamples.Value         = e.ViewportSettings.GlossySamples;
         m_transmissionsamples.Value   = e.ViewportSettings.TransmissionSamples;
         m_maxbounce.Value             = e.ViewportSettings.MaxBounce;
         m_maxdiffusebounce.Value      = e.ViewportSettings.MaxDiffuseBounce;
         m_maxglossybounce.Value       = e.ViewportSettings.MaxGlossyBounce;
         m_maxvolumebounce.Value       = e.ViewportSettings.MaxVolumeBounce;
         m_maxtransmissionbounce.Value = e.ViewportSettings.MaxTransmissionBounce;
         RegisterControlEvents();
     }
 }