0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
[occt.git] / src / V3d / V3d_View.cxx
index ae5bed8..250739e 100644 (file)
@@ -377,10 +377,10 @@ Standard_Boolean V3d_View::IsEmpty() const
 //=============================================================================
 void V3d_View::UpdateLights() const
 {
-  Graphic3d_ListOfCLight aLights;
+  Handle(Graphic3d_LightSet) aLights = new Graphic3d_LightSet();
   for (V3d_ListOfLight::Iterator anActiveLightIter (myActiveLights); anActiveLightIter.More(); anActiveLightIter.Next())
   {
-    aLights.Append (anActiveLightIter.Value()->Light());
+    aLights->Add (anActiveLightIter.Value());
   }
   myView->SetLights (aLights);
 }