public void RegisterVolumeLight(VolumeLight light)
 {
     light.id = volumeLights.Count;
     volumeLights.Add(light);
     UpdateLightInBuffers(volumeLights.Count - 1);
     UploadVolumeLightsToGL();
 }
 public void UnregisterVolumeLight(VolumeLight light)
 {
     for (int i = light.id + 1; i < volumeLights.Count; i++)
     {
         volumeLights[i].id--;
     }
     volumeLights.RemoveAt(light.id);
     RebuildLightBuffers();
     UploadVolumeLightsToGL();
 }
 public void NotifyVolumeLightChange(VolumeLight light)
 {
     UpdateLightInBuffers(light.id);
     UploadVolumeLightsToGL();
 }