Salome HOME
Upgrade to paraview 5.4
[modules/gui.git] / src / OCCViewer / OCCViewer_EnvTextureDlg.cxx
index d1b0b35a80eddc090e7643f041692fa58aa3ba0c..b6e952481805b13c31f1469e388c348c3d292202 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -169,7 +169,11 @@ void OCCViewer_EnvTextureDlg::onEnvTexture( bool theIsChecked )
     onTextureChanged();
   else {
     Handle(Graphic3d_TextureEnv) aTexture;
+#if OCC_VERSION_LARGE > 0x07000000
+    setEnvTexture( aTexture );
+#else
     setEnvTexture( aTexture, V3d_TEX_ALL );
+#endif
   }
 }
 
@@ -196,7 +200,11 @@ void OCCViewer_EnvTextureDlg::onTextureChanged()
                  << Graphic3d_NOT_ENV_LINES  << Graphic3d_NOT_ENV_ROAD;
     aTexture = new Graphic3d_TextureEnv( aTextures.at( myEnvTextureId->currentIndex() ) );
   }
+#if OCC_VERSION_LARGE > 0x07000000
+  setEnvTexture( aTexture );
+#else
   setEnvTexture( aTexture, V3d_TEX_ENVIRONMENT );
+#endif
 }
 
 /*!
@@ -224,13 +232,19 @@ void OCCViewer_EnvTextureDlg::ClickOnHelp()
 /*!
   Sets current texture environment for all view in the viewer
 */
+#if OCC_VERSION_LARGE > 0x07000000
+void OCCViewer_EnvTextureDlg::setEnvTexture( Handle(Graphic3d_TextureEnv) theTexture)
+#else
 void OCCViewer_EnvTextureDlg::setEnvTexture( Handle(Graphic3d_TextureEnv) theTexture, V3d_TypeOfSurfaceDetail theMode )
+#endif
 {
   for ( int i = OCCViewer_ViewFrame::BOTTOM_RIGHT; i <= OCCViewer_ViewFrame::TOP_RIGHT; i++ ) {
     if ( OCCViewer_ViewWindow* aViewWindow = myViewFrame->getView(i) ) {
       Handle(V3d_View) aView = aViewWindow->getViewPort()->getView();
       aView->SetTextureEnv( theTexture );
+#if OCC_VERSION_LARGE <= 0x07000000
       aView->SetSurfaceDetail( theMode );
+#endif
       aView->Redraw();
     }
   }