From a6ea44eedda768b674fbd77f6aa10b121c122ebd Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Fri, 29 Jun 2012 10:58:49 +0200 Subject: [PATCH] VTK compatibility - BlendImageActor issue with legacy VTK versions --- vv/vvBlendImageActor.cxx | 2 +- vv/vvBlendImageActor.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/vv/vvBlendImageActor.cxx b/vv/vvBlendImageActor.cxx index 466083a..2093c7d 100644 --- a/vv/vvBlendImageActor.cxx +++ b/vv/vvBlendImageActor.cxx @@ -47,7 +47,7 @@ void vvBlendImageActor::Render(vtkRenderer *ren) } //Call normal render - vtkImageActor::Render(ren); + VTK_IMAGE_ACTOR::Render(ren); //Move back blending to weighted sum if (vtkgl::BlendEquationEXT!=0) { diff --git a/vv/vvBlendImageActor.h b/vv/vvBlendImageActor.h index 0abe616..bb2e066 100644 --- a/vv/vvBlendImageActor.h +++ b/vv/vvBlendImageActor.h @@ -21,13 +21,20 @@ #include #include + +#if VTK_MAJOR_VERSION >= 5 && VTK_MINOR_VERSION >= 10 +#define VTK_IMAGE_ACTOR vtkImageActor #include +#else +#define VTK_IMAGE_ACTOR vtkOpenGLImageActor +#include +#endif -class vvBlendImageActor : public vtkImageActor +class vvBlendImageActor : public VTK_IMAGE_ACTOR { public: static vvBlendImageActor *New(); - vtkTypeMacro(vvBlendImageActor, vtkImageActor); + vtkTypeMacro(vvBlendImageActor, VTK_IMAGE_ACTOR); virtual void PrintSelf(ostream& os, vtkIndent indent); // Description: -- 2.47.1