From 0923b262f48d8175292929f596108e5d2ac92576 Mon Sep 17 00:00:00 2001
From: Simon Drouin <drouin.simon@gmail.com>
Date: Fri, 15 Mar 2019 22:59:37 -0400
Subject: [PATCH] Fixed chemistry test to build without legacy.

---
 .../Testing/Cxx/TestPDBBallAndStickShadowsDOFSSAA.cxx       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Domains/ChemistryOpenGL2/Testing/Cxx/TestPDBBallAndStickShadowsDOFSSAA.cxx b/Domains/ChemistryOpenGL2/Testing/Cxx/TestPDBBallAndStickShadowsDOFSSAA.cxx
index d354cd02186..f078e1e0fe6 100644
--- a/Domains/ChemistryOpenGL2/Testing/Cxx/TestPDBBallAndStickShadowsDOFSSAA.cxx
+++ b/Domains/ChemistryOpenGL2/Testing/Cxx/TestPDBBallAndStickShadowsDOFSSAA.cxx
@@ -23,6 +23,7 @@
 #include "vtkOpenGLSphereMapper.h"
 #include "vtkNew.h"
 #include "vtkProperty.h"
+#include "vtkShaderProperty.h"
 #include "vtkRenderWindowInteractor.h"
 #include "vtkRenderWindow.h"
 #include "vtkRenderer.h"
@@ -87,10 +88,11 @@ int TestPDBBallAndStickShadowsDOFSSAA(int argc, char *argv[])
   actor->GetProperty()->SetSpecular(0.4);
   actor->GetProperty()->SetSpecularPower(40);
 
+  vtkShaderProperty * sp = actor->GetShaderProperty();
+
   // we override the default shader very slightly so that
   // the ambient color component is scaled off the diffuse
-  molmapper->GetFastAtomMapper()->AddShaderReplacement(
-    vtkShader::Fragment,  // in the fragment shader
+  sp->AddFragmentShaderReplacement(
     "//VTK::Color::Impl",
     true, // before the standard replacements
     "//VTK::Color::Impl\n" // we still want the default
-- 
GitLab