0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
authorvro <vro@opencascade.com>
Tue, 17 Dec 2013 08:27:29 +0000 (12:27 +0400)
committerapn <apn@opencascade.com>
Tue, 17 Dec 2013 08:32:32 +0000 (12:32 +0400)
Turning on the light to display the shapes of the sample.

samples/qt/VoxelDemo/src/Viewer.cpp

index 9d4d20a..f4615df 100644 (file)
@@ -15,6 +15,8 @@
 #include <Aspect_DisplayConnection.hxx>
 #include <Graphic3d.hxx>
 #include <OpenGl_GraphicDriver.hxx>
+#include <V3d_DirectionalLight.hxx>
+#include <V3d_AmbientLight.hxx>
 
 static Handle(Graphic3d_GraphicDriver) Viewer_aGraphicDriver;
 
@@ -72,6 +74,9 @@ Viewer::Viewer(QWidget* parent):QWidget(parent)
        setFocusPolicy( Qt::StrongFocus );
        setAttribute( Qt::WA_PaintOnScreen );
        setAttribute( Qt::WA_NoSystemBackground );
+
+    aViewer->SetLightOn(new V3d_DirectionalLight(aViewer, V3d_XnegYnegZneg, Quantity_NOC_WHITE, Standard_True));
+    aViewer->SetLightOn(new V3d_AmbientLight(aViewer, Quantity_NOC_WHITE));
 }
 
 Viewer::~Viewer()