Skip to content
Browse files

[vtk] Drop support for VTK 5.2 and 5.4

  • Loading branch information...
1 parent e32cb0f commit 127175251b104243e0355441ad0a9e20cda7bc82 Denis Barbier committed Aug 16, 2012
View
8 vtk-util/patch/5.2/apply.sh
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Script that apply all the patchs in correct order to the VTK library.
-# You must be on the root of the VTK source directory when executing this script.
-
-scriptDir=$(dirname $0)
-
-[ -L patches ] || ln -s $scriptDir patches
-quilt push -a
View
73 vtk-util/patch/5.2/depth
@@ -1,73 +0,0 @@
-Do not erase the depth buffer before a selection rendering.
-
-This permits to not have to draw all the scene to check the visibility of an element.
-See http://www.vtk.org/Bug/view.php?id=7296
-
-A fix has been included in CVS HEAD, so this patch has been rewritten
-as a backport in VTK 5.2, maybe it will be accepted upstream.
-Unfortunately this means that ClearDepthForSelection has to be
-replaced by PreserveDepthBuffer (with inverse meaning) in Java sources.
----
-
- Rendering/vtkOpenGLRenderer.cxx | 7 +++++--
- Rendering/vtkRenderer.cxx | 1 +
- Rendering/vtkRenderer.h | 8 ++++++++
- 3 files changed, 14 insertions(+), 2 deletions(-)
-
-
-diff --git a/Rendering/vtkOpenGLRenderer.cxx b/Rendering/vtkOpenGLRenderer.cxx
-index ca3793a..b9168f7 100644
---- a/Rendering/vtkOpenGLRenderer.cxx
-+++ b/Rendering/vtkOpenGLRenderer.cxx
-@@ -1103,8 +1103,11 @@ void vtkOpenGLRenderer::Clear(void)
- clear_mask |= GL_COLOR_BUFFER_BIT;
- }
-
-- glClearDepth(static_cast<GLclampf>(1.0));
-- clear_mask |= GL_DEPTH_BUFFER_BIT;
-+ if (!this->GetPreserveDepthBuffer())
-+ {
-+ glClearDepth(static_cast<GLclampf>(1.0));
-+ clear_mask |= GL_DEPTH_BUFFER_BIT;
-+ }
-
- vtkDebugMacro(<< "glClear\n");
- glClear(clear_mask);
-diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
-index d7c22e9..642fa80 100644
---- a/Rendering/vtkRenderer.cxx
-+++ b/Rendering/vtkRenderer.cxx
-@@ -87,6 +87,7 @@ vtkRenderer::vtkRenderer()
- this->PathArrayCount = 0;
-
- this->Layer = 0;
-+ this->PreserveDepthBuffer = 0;
-
- this->ComputedVisiblePropBounds[0] = VTK_DOUBLE_MAX;
- this->ComputedVisiblePropBounds[1] = -VTK_DOUBLE_MAX;
-diff --git a/Rendering/vtkRenderer.h b/Rendering/vtkRenderer.h
-index a0aae36..1c94e2c 100644
---- a/Rendering/vtkRenderer.h
-+++ b/Rendering/vtkRenderer.h
-@@ -319,6 +319,13 @@ public:
- vtkGetMacro(Layer, int);
-
- // Description:
-+ // Normally a renderer is treated as transparent if Layer > 0. To treat a
-+ // renderer at Layer 0 as transparent, set this flag to true.
-+ vtkSetMacro(PreserveDepthBuffer, int);
-+ vtkGetMacro(PreserveDepthBuffer, int);
-+ vtkBooleanMacro(PreserveDepthBuffer, int);
-+
-+ // Description:
- // Returns a boolean indicating if this renderer is transparent. It is
- // transparent if it is not in the deepest layer of its render window.
- int Transparent();
-@@ -481,6 +488,7 @@ protected:
- // Shows what layer this renderer belongs to. Only of interested when
- // there are layered renderers.
- int Layer;
-+ int PreserveDepthBuffer;
-
- // Holds the result of ComputeVisiblePropBounds so that it is visible from
- // wrapped languages
View
140 vtk-util/patch/5.2/displayList
@@ -1,140 +0,0 @@
-Gain many time in pick color.
-
-Additionnal information at http://www.vtk.org/Bug/view.php?id=7111
----
-
- Rendering/vtkOpenGLDisplayListPainter.cxx | 17 +++++++++++------
- Rendering/vtkPainter.cxx | 5 +++++
- Rendering/vtkPainter.h | 17 +++++++++++++++++
- Rendering/vtkRenderer.cxx | 2 ++
- Rendering/vtkRenderer.h | 2 ++
- 5 files changed, 37 insertions(+), 6 deletions(-)
-
-
-diff --git a/Rendering/vtkOpenGLDisplayListPainter.cxx b/Rendering/vtkOpenGLDisplayListPainter.cxx
-index 8e74f04..08881ca 100644
---- a/Rendering/vtkOpenGLDisplayListPainter.cxx
-+++ b/Rendering/vtkOpenGLDisplayListPainter.cxx
-@@ -79,15 +79,21 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer* renderer, vtkActor
- return;
- }
-
-+ long time = this->GetPreviousRenderingForSelection();
-+ if(time == 0)
-+ time = this->BuildTime;
-+ else
-+ time = renderer->GetRenderTime();
-+
- this->TimeToDraw = 0.0;
-
- // if something has changed regenrate display lists.
- if (!this->DisplayListId ||
-- this->GetMTime() > this->BuildTime ||
-- this->GetInput()->GetMTime() > this->BuildTime ||
-- actor->GetProperty()->GetMTime() > this->BuildTime ||
-+ (this->GetMTime() > time && time == this->BuildTime) ||
-+ this->GetInput()->GetMTime() > time ||
-+ actor->GetProperty()->GetMTime() > time ||
- renderer->GetRenderWindow() != this->LastWindow.GetPointer() ||
-- this->Information->GetMTime() > this->BuildTime ||
-+ //this->Information->GetMTime() > this->BuildTime ||
- this->LastUsedTypeFlags != typeflags)
- {
- this->ReleaseList();
-@@ -96,11 +102,10 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer* renderer, vtkActor
- // generate the display list.
- this->Superclass::RenderInternal(renderer, actor, typeflags);
- glEndList();
--
-+ }
- this->BuildTime.Modified();
- this->LastWindow = renderer->GetRenderWindow();
- this->LastUsedTypeFlags = typeflags;
-- }
-
- // Time the actual drawing.
- this->Timer->StartTimer();
-diff --git a/Rendering/vtkPainter.cxx b/Rendering/vtkPainter.cxx
-index afc3e46..c3c10e4 100644
---- a/Rendering/vtkPainter.cxx
-+++ b/Rendering/vtkPainter.cxx
-@@ -83,6 +83,8 @@ vtkPainter::vtkPainter()
- this->SetInformation(temp);
- temp->Delete();
-
-+ this->PreviousRenderingForSelection = 0;
-+
- vtkPainter::STATIC_DATA()->Set(this->Information, 0);
- vtkPainter::CONSERVE_MEMORY()->Set(this->Information, 0);
- vtkPainter::HIGH_QUALITY()->Set(this->Information, 1);
-@@ -209,6 +211,9 @@ void vtkPainter::Render(vtkRenderer* renderer, vtkActor* actor,
-
- this->PrepareForRendering(renderer, actor);
- this->RenderInternal(renderer, actor, typeflags);
-+
-+ // If the previous rendering selection information exist remove it
-+ SetPreviousRenderingForSelection(0);
- }
-
- //-----------------------------------------------------------------------------
-diff --git a/Rendering/vtkPainter.h b/Rendering/vtkPainter.h
-index 69cbfe2..ac619c0 100644
---- a/Rendering/vtkPainter.h
-+++ b/Rendering/vtkPainter.h
-@@ -146,6 +146,21 @@ public:
- virtual vtkDataObject* GetOutput()
- { return this->Input; }
-
-+ // Description:
-+ // If you're making a selection rendering please add the TimeStamp time of the
-+ // selection rendering.
-+ // If the value is equal to zero then the previous rendering is not a selection rendering.
-+ // If the value is different of zero then the previous rendering was a selection rendering.
-+ void SetPreviousRenderingForSelection(int value)
-+ {
-+ this->PreviousRenderingForSelection = value;
-+ }
-+
-+ int GetPreviousRenderingForSelection()
-+ {
-+ return this->PreviousRenderingForSelection;
-+ }
-+
- //BTX
- protected:
- vtkPainter();
-@@ -223,6 +238,8 @@ protected:
-
- double TimeToDraw;
- vtkTimerLog* Timer;
-+
-+ int PreviousRenderingForSelection;
-
- vtkWeakPointer<vtkWindow> LastWindow; // Window used for previous render.
- // This is not reference counted.
-diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
-index 642fa80..f51a0ad 100644
---- a/Rendering/vtkRenderer.cxx
-+++ b/Rendering/vtkRenderer.cxx
-@@ -1864,6 +1864,8 @@ void vtkRenderer::SwapOutSelectablePainter(
- {
- orig_mapper->SetPainter(orig_painter);
- orig_painter->UnRegister(this);
-+ // Inform the painters that this rendering is a selection rendering
-+ orig_painter->SetPreviousRenderingForSelection(orig_mapper->GetMTime());
- }
- }
- if (!orig_painter)
-diff --git a/Rendering/vtkRenderer.h b/Rendering/vtkRenderer.h
-index 1c94e2c..b9fcc9c 100644
---- a/Rendering/vtkRenderer.h
-+++ b/Rendering/vtkRenderer.h
-@@ -433,6 +433,8 @@ public:
- // Initial value is false.
- vtkGetMacro(LastRenderingUsedDepthPeeling,int);
-
-+ vtkGetMacro(RenderTime,int);
-+
- protected:
- vtkRenderer();
- ~vtkRenderer();
View
96 vtk-util/patch/5.2/getColorBufferSizes
@@ -1,96 +0,0 @@
-Allow wrapping of vtkRenderWindow::GetColorBufferSizes
-
-See http://www.vtk.org/Bug/view.php?id=7857
-
-When color depth is lower than 24, vtkVisibleCellSelector::Select()
-silently fails. We want to detect this case to provide
-a software alternative, or at least tell user why picking
-does not work.
----
-
- Rendering/vtkMesaRenderWindow.h | 1 +
- Rendering/vtkOpenGLRenderWindow.cxx | 17 +++++++++++++++++
- Rendering/vtkOpenGLRenderWindow.h | 1 +
- Rendering/vtkRenderWindow.h | 2 ++
- 4 files changed, 21 insertions(+), 0 deletions(-)
-
-
-diff --git a/Rendering/vtkMesaRenderWindow.h b/Rendering/vtkMesaRenderWindow.h
-index 6c5c9ad..790f570 100644
---- a/Rendering/vtkMesaRenderWindow.h
-+++ b/Rendering/vtkMesaRenderWindow.h
-@@ -108,6 +108,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- int GetColorBufferSizes(int *rgba);
-+ int GetColorBufferSizes(vtkIntArray *rgba);
-
- // Description:
- // Initialize OpenGL for this window.
-diff --git a/Rendering/vtkOpenGLRenderWindow.cxx b/Rendering/vtkOpenGLRenderWindow.cxx
-index f57de95..f6079d2 100644
---- a/Rendering/vtkOpenGLRenderWindow.cxx
-+++ b/Rendering/vtkOpenGLRenderWindow.cxx
-@@ -23,6 +23,7 @@ PURPOSE. See the above copyright notice for more information.
- #include "vtkIdList.h"
- #include "vtkObjectFactory.h"
- #include "vtkFloatArray.h"
-+#include "vtkIntArray.h"
- #include "vtkUnsignedCharArray.h"
- #include "assert.h"
- #include "vtkOpenGLExtensionManager.h"
-@@ -332,6 +333,22 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int *rgba)
- }
- }
-
-+int vtkOpenGLRenderWindow::GetColorBufferSizes(vtkIntArray *rgba)
-+{
-+ if (rgba==NULL)
-+ {
-+ return 0;
-+ }
-+
-+ if ( rgba->GetMaxId()+1 != 4)
-+ {
-+ vtkDebugMacro("Resizing array.");
-+ rgba->SetNumberOfComponents(1);
-+ rgba->SetNumberOfValues(4);
-+ }
-+ return this->GetColorBufferSizes(rgba->GetPointer(0));
-+}
-+
- unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1,
- int x2, int y2,
- int front)
-diff --git a/Rendering/vtkOpenGLRenderWindow.h b/Rendering/vtkOpenGLRenderWindow.h
-index 2fed9c5..f7dca57 100644
---- a/Rendering/vtkOpenGLRenderWindow.h
-+++ b/Rendering/vtkOpenGLRenderWindow.h
-@@ -103,6 +103,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- int GetColorBufferSizes(int *rgba);
-+ int GetColorBufferSizes(vtkIntArray *rgba);
-
- // Description:
- // Initialize OpenGL for this window.
-diff --git a/Rendering/vtkRenderWindow.h b/Rendering/vtkRenderWindow.h
-index 6c42dea..b9f4a67 100644
---- a/Rendering/vtkRenderWindow.h
-+++ b/Rendering/vtkRenderWindow.h
-@@ -41,6 +41,7 @@
- #include "vtkWindow.h"
-
- class vtkFloatArray;
-+class vtkIntArray;
- class vtkPainterDeviceAdapter;
- class vtkRenderWindowInteractor;
- class vtkRenderer;
-@@ -497,6 +498,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- virtual int GetColorBufferSizes(int *rgba) = 0;
-+ virtual int GetColorBufferSizes(vtkIntArray *rgba) = 0;
-
- // Description:
- // Get the vtkPainterDeviceAdapter which can be used to paint on
View
244 vtk-util/patch/5.2/light
@@ -1,244 +0,0 @@
-Permit to disable lighting for an actor.
-
-See http://www.vtk.org/Bug/view.php?id=7521
-
-A different patch has been committed upstream, it is
-here backported into 5.2 branch
-
-commit 555b94e5eff319c73f2022507c880399bf0e8208
-Author: Francois Bertel
-Date: Wed Feb 4 16:43:17 2009 +0000
-
- BUG:7521 Added lighting flag on vtkProperty.
----
-
- Rendering/Testing/Cxx/CMakeLists.txt | 1
- Rendering/Testing/Cxx/TestActorLightingFlag.cxx | 109 +++++++++++++++++++++++
- Rendering/vtkOpenGLLightingPainter.cxx | 9 ++
- Rendering/vtkOpenGLProperty.cxx | 9 ++
- Rendering/vtkProperty.cxx | 10 ++
- Rendering/vtkProperty.h | 7 +
- 6 files changed, 145 insertions(+), 0 deletions(-)
- create mode 100644 Rendering/Testing/Cxx/TestActorLightingFlag.cxx
-
-
-diff --git a/Rendering/Testing/Cxx/CMakeLists.txt b/Rendering/Testing/Cxx/CMakeLists.txt
-index f876f8e..78fd005 100644
---- a/Rendering/Testing/Cxx/CMakeLists.txt
-+++ b/Rendering/Testing/Cxx/CMakeLists.txt
-@@ -17,6 +17,7 @@ IF(VTK_USE_DISPLAY)
- SET(RenderingTestsWithArguments
- ${RenderingTestsWithArguments}
- LoadOpenGLExtension.cxx
-+ TestActorLightingFlag.cxx
- TestDynamic2DLabelMapper.cxx
- TestFBO.cxx
- TestGradientBackground.cxx
-diff --git a/Rendering/Testing/Cxx/TestActorLightingFlag.cxx b/Rendering/Testing/Cxx/TestActorLightingFlag.cxx
-new file mode 100644
-index 0000000..238eaf1
---- /dev/null
-+++ b/Rendering/Testing/Cxx/TestActorLightingFlag.cxx
-@@ -0,0 +1,109 @@
-+/*=========================================================================
-+
-+ Program: Visualization Toolkit
-+ Module: $RCSfile$
-+
-+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
-+ All rights reserved.
-+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-+
-+ This software is distributed WITHOUT ANY WARRANTY; without even
-+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-+ PURPOSE. See the above copyright notice for more information.
-+
-+=========================================================================*/
-+// This test covers the lighting flag on a vtkProperty object of an vtkActor.
-+// It draws a cone with lighting next to a cone with no lighting, next to a
-+// third cone with lighting again.
-+//
-+// The command line arguments are:
-+// -I => run in interactive mode; unless this is used, the program will
-+// not allow interaction and exit
-+
-+#include "vtkTestUtilities.h"
-+#include "vtkRegressionTestImage.h"
-+
-+#include "vtkRenderWindowInteractor.h"
-+#include "vtkRenderWindow.h"
-+#include "vtkRenderer.h"
-+#include "vtkActor.h"
-+
-+#include "vtkPolyDataMapper.h"
-+#include "vtkCamera.h"
-+
-+#include "vtkConeSource.h"
-+#include "vtkProperty.h"
-+
-+
-+// For each spotlight, add a light frustum wireframe representation and a cone
-+// wireframe representation, colored with the light color.
-+void AddLightActors(vtkRenderer *r);
-+
-+int TestActorLightingFlag(int argc, char* argv[])
-+{
-+ vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();
-+ vtkRenderWindow *renWin = vtkRenderWindow::New();
-+ renWin->SetMultiSamples(0);
-+
-+ renWin->SetAlphaBitPlanes(1);
-+ iren->SetRenderWindow(renWin);
-+ renWin->Delete();
-+
-+ vtkRenderer *renderer = vtkRenderer::New();
-+ renWin->AddRenderer(renderer);
-+ renderer->Delete();
-+
-+ vtkConeSource *coneSource1=vtkConeSource::New();
-+ vtkPolyDataMapper *coneMapper1=vtkPolyDataMapper::New();
-+ coneMapper1->SetInputConnection(coneSource1->GetOutputPort());
-+ coneSource1->Delete();
-+ vtkActor *coneActor1=vtkActor::New();
-+ coneActor1->SetMapper(coneMapper1);
-+ coneMapper1->Delete();
-+ coneActor1->SetPosition(-2.0,0.0,0.0);
-+ renderer->AddActor(coneActor1);
-+ coneActor1->Delete();
-+
-+ vtkConeSource *coneSource2=vtkConeSource::New();
-+ vtkPolyDataMapper *coneMapper2=vtkPolyDataMapper::New();
-+ coneMapper2->SetInputConnection(coneSource2->GetOutputPort());
-+ coneSource2->Delete();
-+ vtkActor *coneActor2=vtkActor::New();
-+ coneActor2->SetMapper(coneMapper2);
-+ coneMapper2->Delete();
-+ coneActor2->SetPosition(0.0,0.0,0.0);
-+ coneActor2->GetProperty()->SetLighting(false);
-+ renderer->AddActor(coneActor2);
-+ coneActor2->Delete();
-+
-+ vtkConeSource *coneSource3=vtkConeSource::New();
-+ vtkPolyDataMapper *coneMapper3=vtkPolyDataMapper::New();
-+ coneMapper3->SetInputConnection(coneSource3->GetOutputPort());
-+ coneSource3->Delete();
-+ vtkActor *coneActor3=vtkActor::New();
-+ coneActor3->SetMapper(coneMapper3);
-+ coneMapper3->Delete();
-+ coneActor3->SetPosition(2.0,0.0,0.0);
-+ renderer->AddActor(coneActor3);
-+ coneActor3->Delete();
-+
-+ renderer->SetBackground(0.1,0.3,0.0);
-+ renWin->SetSize(200,200);
-+
-+ renWin->Render();
-+
-+ vtkCamera *camera=renderer->GetActiveCamera();
-+ camera->Azimuth(-40.0);
-+ camera->Elevation(20.0);
-+ renderer->ResetCamera();
-+ renWin->Render();
-+
-+ int retVal = vtkRegressionTestImage( renWin );
-+ if ( retVal == vtkRegressionTester::DO_INTERACTOR)
-+ {
-+ iren->Start();
-+ }
-+ iren->Delete();
-+
-+ return !retVal;
-+}
-diff --git a/Rendering/vtkOpenGLLightingPainter.cxx b/Rendering/vtkOpenGLLightingPainter.cxx
-index 137c5e5..5949ecb 100644
---- a/Rendering/vtkOpenGLLightingPainter.cxx
-+++ b/Rendering/vtkOpenGLLightingPainter.cxx
-@@ -133,6 +133,15 @@ void vtkOpenGLLightingPainter::RenderInternal(vtkRenderer* renderer, vtkActor* a
- enable_flags);
- this->ProgressScaleFactor =
- static_cast<double>(enabled_cells) / total_cells;
-+
-+ if(actor->GetProperty()->GetLighting()) // fixed-pipeline
-+ {
-+ glEnable(GL_LIGHTING);
-+ }
-+ else
-+ {
-+ glDisable(GL_LIGHTING);
-+ }
- this->Superclass::RenderInternal(renderer, actor, enable_flags);
-
- time_to_draw += this->DelegatePainter?
-diff --git a/Rendering/vtkOpenGLProperty.cxx b/Rendering/vtkOpenGLProperty.cxx
-index 7637535..e98d5f2 100644
---- a/Rendering/vtkOpenGLProperty.cxx
-+++ b/Rendering/vtkOpenGLProperty.cxx
-@@ -179,6 +179,15 @@ void vtkOpenGLProperty::Render(vtkActor *anActor,
- #endif // VTK_USE_GL2PS
- }
-
-+ if(this->Lighting) // fixed-pipeline
-+ {
-+ glEnable(GL_LIGHTING);
-+ }
-+ else
-+ {
-+ glDisable(GL_LIGHTING);
-+ }
-+
- this->Superclass::Render(anActor, ren);
- }
-
-diff --git a/Rendering/vtkProperty.cxx b/Rendering/vtkProperty.cxx
-index f39368c..5c7a09c 100644
---- a/Rendering/vtkProperty.cxx
-+++ b/Rendering/vtkProperty.cxx
-@@ -203,6 +203,7 @@ vtkProperty::vtkProperty()
- this->LineWidth = 1.0;
- this->LineStipplePattern = 0xFFFF;
- this->LineStippleRepeatFactor = 1;
-+ this->Lighting=true;
-
- this->Shading = 0;
- this->ShaderProgram = 0;
-@@ -934,6 +935,15 @@ void vtkProperty::PrintSelf(ostream& os, vtkIndent indent)
- os << indent << "Line width: " << this->LineWidth << "\n";
- os << indent << "Line stipple pattern: " << this->LineStipplePattern << "\n";
- os << indent << "Line stipple repeat factor: " << this->LineStippleRepeatFactor << "\n";
-+ os << indent << "Lighting: ";
-+ if(this->Lighting)
-+ {
-+ os << "On" << endl;
-+ }
-+ else
-+ {
-+ os << "Off" << endl;
-+ }
-
- os << indent << "Shading: "
- << (this->Shading? "On" : "Off") << endl;
-diff --git a/Rendering/vtkProperty.h b/Rendering/vtkProperty.h
-index f3d8d63..00e89ed 100644
---- a/Rendering/vtkProperty.h
-+++ b/Rendering/vtkProperty.h
-@@ -91,6 +91,12 @@ public:
- //ETX
-
- // Description:
-+ // Set/Get lighting flag for an object. Initial value is true.
-+ vtkGetMacro(Lighting,bool);
-+ vtkSetMacro(Lighting,bool);
-+ vtkBooleanMacro(Lighting,bool);
-+
-+ // Description:
- // Set the shading interpolation method for an object.
- vtkSetClampMacro(Interpolation,int,VTK_FLAT,VTK_PHONG);
- vtkGetMacro(Interpolation,int);
-@@ -381,6 +387,7 @@ protected:
- int EdgeVisibility;
- int BackfaceCulling;
- int FrontfaceCulling;
-+ bool Lighting;
-
- int Shading;
-
View
297 vtk-util/patch/5.2/offset
@@ -1,297 +0,0 @@
-Make different polygon offset for each mappers.
-
-By default VTK use statics members so the offset parameters are shared by all the mappers.
-See http://www.vtk.org/Bug/view.php?id=7294
----
-
- Rendering/vtkMapper.cxx | 69 ++++----------------
- Rendering/vtkMapper.h | 63 ++++++++++++------
- Rendering/vtkOpenGLImageActor.cxx | 11 +++
- Widgets/Testing/Cxx/TestImageTracerWidget.cxx | 4 +
- .../Testing/Cxx/TestOrientationMarkerWidget.cxx | 2 -
- 5 files changed, 67 insertions(+), 82 deletions(-)
-
-
-diff --git a/Rendering/vtkMapper.cxx b/Rendering/vtkMapper.cxx
-index 678c84c..691c194 100644
---- a/Rendering/vtkMapper.cxx
-+++ b/Rendering/vtkMapper.cxx
-@@ -27,13 +27,6 @@ vtkCxxRevisionMacro(vtkMapper, "$Revision$");
- // Initialize static member that controls global immediate mode rendering
- static int vtkMapperGlobalImmediateModeRendering = 0;
-
--// Initialize static member that controls global coincidence resolution
--static int vtkMapperGlobalResolveCoincidentTopology = VTK_RESOLVE_OFF;
--static double vtkMapperGlobalResolveCoincidentTopologyZShift = 0.01;
--static double vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor = 1.0;
--static double vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits = 1.0;
--static int vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces = 1;
--
- // Construct with initial range (0,1).
- vtkMapper::vtkMapper()
- {
-@@ -64,6 +57,12 @@ vtkMapper::vtkMapper()
- this->InterpolateScalarsBeforeMapping = 0;
- this->ColorCoordinates = 0;
- this->ColorTextureMap = 0;
-+
-+ this->ResolveCoincidentTopology = VTK_RESOLVE_OFF;
-+ this->ResolveCoincidentTopologyZShift = 0.01;
-+ this->ResolveCoincidentTopologyPolygonOffsetFactor = 1.0;
-+ this->ResolveCoincidentTopologyPolygonOffsetUnits = 1.0;
-+ this->ResolveCoincidentTopologyPolygonOffsetFaces = 1;
- }
-
- vtkMapper::~vtkMapper()
-@@ -132,66 +131,28 @@ int vtkMapper::GetGlobalImmediateModeRendering()
- return vtkMapperGlobalImmediateModeRendering;
- }
-
--void vtkMapper::SetResolveCoincidentTopology(int val)
--{
-- if (val == vtkMapperGlobalResolveCoincidentTopology)
-- {
-- return;
-- }
-- vtkMapperGlobalResolveCoincidentTopology = val;
--}
--
--int vtkMapper::GetResolveCoincidentTopology()
--{
-- return vtkMapperGlobalResolveCoincidentTopology;
--}
--
- void vtkMapper::SetResolveCoincidentTopologyToDefault()
- {
-- vtkMapperGlobalResolveCoincidentTopology = VTK_RESOLVE_OFF;
--}
--
--void vtkMapper::SetResolveCoincidentTopologyZShift(double val)
--{
-- if (val == vtkMapperGlobalResolveCoincidentTopologyZShift)
-- {
-- return;
-- }
-- vtkMapperGlobalResolveCoincidentTopologyZShift = val;
--}
--
--double vtkMapper::GetResolveCoincidentTopologyZShift()
--{
-- return vtkMapperGlobalResolveCoincidentTopologyZShift;
-+ this->ResolveCoincidentTopology = VTK_RESOLVE_OFF;
- }
-
- void vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(
- double factor, double units)
- {
-- if (factor == vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor &&
-- units == vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits )
-+ if (factor == this->ResolveCoincidentTopologyPolygonOffsetFactor &&
-+ units == this->ResolveCoincidentTopologyPolygonOffsetUnits )
- {
- return;
- }
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor = factor;
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits = units;
-+ this->ResolveCoincidentTopologyPolygonOffsetFactor = factor;
-+ this->ResolveCoincidentTopologyPolygonOffsetUnits = units;
- }
-
- void vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(
- double& factor, double& units)
- {
-- factor = vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor;
-- units = vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits;
--}
--
--void vtkMapper::SetResolveCoincidentTopologyPolygonOffsetFaces(int faces)
--{
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces = faces;
--}
--
--int vtkMapper::GetResolveCoincidentTopologyPolygonOffsetFaces()
--{
-- return vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces;
-+ factor = this->ResolveCoincidentTopologyPolygonOffsetFactor;
-+ units = this->ResolveCoincidentTopologyPolygonOffsetUnits;
- }
-
- // Overload standard modified time function. If lookup table is modified,
-@@ -700,11 +661,11 @@ void vtkMapper::PrintSelf(ostream& os, vtkIndent indent)
- os << indent << "RenderTime: " << this->RenderTime << endl;
-
- os << indent << "Resolve Coincident Topology: ";
-- if ( vtkMapperGlobalResolveCoincidentTopology == VTK_RESOLVE_OFF )
-+ if ( this->ResolveCoincidentTopology == VTK_RESOLVE_OFF )
- {
- os << "Off" << endl;
- }
-- else if ( vtkMapperGlobalResolveCoincidentTopology == VTK_RESOLVE_POLYGON_OFFSET )
-+ else if ( this->ResolveCoincidentTopology == VTK_RESOLVE_POLYGON_OFFSET )
- {
- os << "Polygon Offset" << endl;
- }
-diff --git a/Rendering/vtkMapper.h b/Rendering/vtkMapper.h
-index b277878..526fc55 100644
---- a/Rendering/vtkMapper.h
-+++ b/Rendering/vtkMapper.h
-@@ -263,41 +263,26 @@ public:
- // approach, you may also want to set the ResolveCoincidentTopologyZShift
- // value. (Note: not all mappers/graphics systems implement this
- // functionality.)
-- static void SetResolveCoincidentTopology(int val);
-- static int GetResolveCoincidentTopology();
-- static void SetResolveCoincidentTopologyToDefault();
-- static void SetResolveCoincidentTopologyToOff()
-+ /*void SetResolveCoincidentTopology(int val);
-+ int GetResolveCoincidentTopology();*/
-+ void SetResolveCoincidentTopologyToDefault();
-+ void SetResolveCoincidentTopologyToOff()
- {SetResolveCoincidentTopology(VTK_RESOLVE_OFF);}
-- static void SetResolveCoincidentTopologyToPolygonOffset()
-+ void SetResolveCoincidentTopologyToPolygonOffset()
- {SetResolveCoincidentTopology(VTK_RESOLVE_POLYGON_OFFSET);}
-- static void SetResolveCoincidentTopologyToShiftZBuffer()
-+ void SetResolveCoincidentTopologyToShiftZBuffer()
- {SetResolveCoincidentTopology(VTK_RESOLVE_SHIFT_ZBUFFER);}
-
- // Description:
- // Used to set the polygon offset scale factor and units.
- // Used when ResolveCoincidentTopology is set to PolygonOffset.
- // These are global variables.
-- static void SetResolveCoincidentTopologyPolygonOffsetParameters(
-+ void SetResolveCoincidentTopologyPolygonOffsetParameters(
- double factor, double units);
-- static void GetResolveCoincidentTopologyPolygonOffsetParameters(
-+ void GetResolveCoincidentTopologyPolygonOffsetParameters(
- double& factor, double& units);
-
- // Description:
-- // Used when ResolveCoincidentTopology is set to PolygonOffset. The polygon
-- // offset can be applied either to the solid polygonal faces or the
-- // lines/vertices. When set (default), the offset is applied to the faces
-- // otherwise it is applied to lines and vertices.
-- // This is a global variable.
-- static void SetResolveCoincidentTopologyPolygonOffsetFaces(int faces);
-- static int GetResolveCoincidentTopologyPolygonOffsetFaces();
--
-- // Description:
-- // Used to set the z-shift if ResolveCoincidentTopology is set to
-- // ShiftZBuffer. This is a global variable.
-- static void SetResolveCoincidentTopologyZShift(double val);
-- static double GetResolveCoincidentTopologyZShift();
--
-- // Description:
- // Return bounding box (array of six doubles) of data expressed as
- // (xmin,xmax, ymin,ymax, zmin,zmax).
- virtual double *GetBounds();
-@@ -347,6 +332,31 @@ public:
- void SetScalarMaterialModeToAmbientAndDiffuse()
- {this->SetScalarMaterialMode(VTK_MATERIALMODE_AMBIENT_AND_DIFFUSE);};
-
-+ // controls coincidence resolution
-+ vtkSetMacro(ResolveCoincidentTopology, int);
-+ vtkGetMacro(ResolveCoincidentTopology, int);
-+
-+ // Description:
-+ // Used to set the z-shift if ResolveCoincidentTopology is set to
-+ // ShiftZBuffer. This is a global variable.
-+ vtkSetMacro(ResolveCoincidentTopologyZShift, double);
-+ vtkGetMacro(ResolveCoincidentTopologyZShift, double);
-+
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetFactor, double);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetFactor, double);
-+
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetUnits, double);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetUnits, double);
-+
-+ // Description:
-+ // Used when ResolveCoincidentTopology is set to PolygonOffset. The polygon
-+ // offset can be applied either to the solid polygonal faces or the
-+ // lines/vertices. When set (default), the offset is applied to the faces
-+ // otherwise it is applied to lines and vertices.
-+ // This is a global variable.
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetFaces, int);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetFaces, int);
-+
- // Description:
- // Return the light-model color mode.
- const char *GetScalarMaterialModeAsString();
-@@ -375,6 +385,13 @@ protected:
- int ScalarMode;
- int ScalarMaterialMode;
-
-+ // Controls coincidence resolution
-+ int ResolveCoincidentTopology;
-+ double ResolveCoincidentTopologyZShift;
-+ double ResolveCoincidentTopologyPolygonOffsetFactor;
-+ double ResolveCoincidentTopologyPolygonOffsetUnits;
-+ int ResolveCoincidentTopologyPolygonOffsetFaces;
-+
- double RenderTime;
-
- // for coloring by a component of a field data array
-diff --git a/Rendering/vtkOpenGLImageActor.cxx b/Rendering/vtkOpenGLImageActor.cxx
-index ba6aaec..bc53fd1 100644
---- a/Rendering/vtkOpenGLImageActor.cxx
-+++ b/Rendering/vtkOpenGLImageActor.cxx
-@@ -314,6 +314,11 @@ unsigned char *vtkOpenGLImageActor::MakeDataSuitable(int &xsize, int &ysize,
- return res;
- }
-
-+#include <iostream>
-+#include <cassert>
-+
-+using namespace std;
-+
- // Implement base class method.
- void vtkOpenGLImageActor::Load(vtkRenderer *ren)
- {
-@@ -457,7 +462,9 @@ void vtkOpenGLImageActor::Load(vtkRenderer *ren)
-
-
- // draw the quad
-- if ( vtkMapper::GetResolveCoincidentTopology() )
-+ cerr << "You should rewrite the polygon offSet of vtkOpenGLImageActor !" << endl;
-+ assert(0);
-+ /*if ( vtkMapper::GetResolveCoincidentTopology() )
- {
- if ( vtkMapper::GetResolveCoincidentTopology() ==
- VTK_RESOLVE_SHIFT_ZBUFFER )
-@@ -472,7 +479,7 @@ void vtkOpenGLImageActor::Load(vtkRenderer *ren)
- glPolygonOffset(f,u);
- #endif
- }
-- }
-+ }*/
- glDisable(GL_COLOR_MATERIAL);
- glDisable (GL_CULL_FACE);
- glDisable( GL_LIGHTING );
-diff --git a/Widgets/Testing/Cxx/TestImageTracerWidget.cxx b/Widgets/Testing/Cxx/TestImageTracerWidget.cxx
-index 25c41d5..2c9b03c 100644
---- a/Widgets/Testing/Cxx/TestImageTracerWidget.cxx
-+++ b/Widgets/Testing/Cxx/TestImageTracerWidget.cxx
-@@ -351,8 +351,8 @@ int TestImageTracerWidget( int argc, char *argv[] )
- char* fname = vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/headsq/quarter");
-
- // Increase polygon offsets to support some OpenGL drivers
-- vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-- vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(10,10);
-+ //vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-+ //vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(10,10);
-
- // Start by loading some data.
- //
-diff --git a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-index 628a587..9910e84 100644
---- a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-+++ b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-@@ -461,7 +461,7 @@ int TestOrientationMarkerWidget( int argc, char *argv[] )
- // this static function improves the appearance of the text edges
- // since they are overlaid on a surface rendering of the cube's faces
- //
-- vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-+ //vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-
- // anatomic labelling
- //
View
22 vtk-util/patch/5.2/parseJava
@@ -1,22 +0,0 @@
-Improve Print() to help debugging
-
-See http://www.vtk.org/Bug/view.php?id=7886
----
-
- Wrapping/vtkParseJava.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-
-diff --git a/Wrapping/vtkParseJava.c b/Wrapping/vtkParseJava.c
-index b05d59e..9be3def 100644
---- a/Wrapping/vtkParseJava.c
-+++ b/Wrapping/vtkParseJava.c
-@@ -708,7 +708,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
- /* Add the PrintRevisions method to vtkObject. */
- fprintf(fp," public native String PrintRevisions();\n");
- /* Add the default toString from java object */
-- fprintf(fp," public String toString() { return Print(); }\n");
-+ fprintf(fp," public String toString() { return getClass().getName()+\"@\"+Integer.toHexString(hashCode())+\" \"+Print(); }\n");
- }
-
- if (!strcmp("vtkObject",data->ClassName))
View
10 vtk-util/patch/5.2/series
@@ -1,10 +0,0 @@
-# This series applies on GIT commit fe6d84f7eddf83604d4a4784b197a9922c24fb10
-depth
-displayList
-offset
-translucent
-underscore
-warning
-light
-getColorBufferSizes
-parseJava
View
84 vtk-util/patch/5.2/translucent
@@ -1,84 +0,0 @@
-Allow picking translucent objects
-
-See http://www.vtk.org/Bug/view.php?id=7295
----
-
- Rendering/vtkRenderer.cxx | 22 ++++++++++++++++++++++
- Rendering/vtkRenderer.h | 9 +++++++++
- 2 files changed, 31 insertions(+), 0 deletions(-)
-
-
-diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
-index f51a0ad..25fa3f9 100644
---- a/Rendering/vtkRenderer.cxx
-+++ b/Rendering/vtkRenderer.cxx
-@@ -118,6 +118,7 @@ vtkRenderer::vtkRenderer()
- this->OcclusionRatio=0.0;
- this->MaximumNumberOfPeels=4;
- this->LastRenderingUsedDepthPeeling=0;
-+ this->PickTranslucent=0;
- }
-
- vtkRenderer::~vtkRenderer()
-@@ -1760,6 +1761,25 @@ int vtkRenderer::UpdateGeometryForSelection()
- return 0;
- }
-
-+ // Check if there is translucent geometry
-+ // do the render library specific stuff about translucent polygonal geometry.
-+ // As it can be expensive, do a quick check if we can skip this step
-+ int hasTranslucentPolygonalGeometry=0;
-+ if(PickTranslucent)
-+ {
-+ for ( i = 0; !hasTranslucentPolygonalGeometry && i < this->PropArrayCount;
-+ i++ )
-+ {
-+ hasTranslucentPolygonalGeometry=
-+ this->PropArray[i]->HasTranslucentPolygonalGeometry();
-+ }
-+ // Have to be set before a call to UpdateTranslucentPolygonalGeometry()
-+ // because UpdateTranslucentPolygonalGeometry() will eventually call
-+ // vtkOpenGLActor::Render() that uses this flag.
-+ if(hasTranslucentPolygonalGeometry)
-+ this->LastRenderingUsedDepthPeeling=0;
-+ }
-+
- // loop through props and give them a chance to
- // render themselves as opaque geometry
- for ( i = 0; i < this->PropArrayCount; i++ )
-@@ -1787,6 +1807,8 @@ int vtkRenderer::UpdateGeometryForSelection()
- {
- this->NumberOfPropsRendered +=
- this->PropArray[i]->RenderOpaqueGeometry(this);
-+ if(hasTranslucentPolygonalGeometry != 0 && this->PropArray[i]->HasTranslucentPolygonalGeometry())
-+ this->PropArray[i]->RenderTranslucentPolygonalGeometry(this);
- }
-
- //restore the prop's original settings
-diff --git a/Rendering/vtkRenderer.h b/Rendering/vtkRenderer.h
-index b9fcc9c..5f96cd5 100644
---- a/Rendering/vtkRenderer.h
-+++ b/Rendering/vtkRenderer.h
-@@ -432,6 +432,12 @@ public:
- // actually used depth peeling.
- // Initial value is false.
- vtkGetMacro(LastRenderingUsedDepthPeeling,int);
-+
-+ // Description:
-+ // Turn on/off the selection of translucents actors.
-+ vtkSetMacro(PickTranslucent,int);
-+ vtkGetMacro(PickTranslucent,int);
-+ vtkBooleanMacro(PickTranslucent,int);
-
- vtkGetMacro(RenderTime,int);
-
-@@ -581,6 +587,9 @@ protected:
- // actually used depth peeling.
- // Initial value is false.
- int LastRenderingUsedDepthPeeling;
-+
-+ // Tells if the translucent actors can be picked.
-+ int PickTranslucent;
-
- // VISIBLE CELL SELECTION ----------------------------------------
- //BTX
View
87 vtk-util/patch/5.2/underscore
@@ -1,87 +0,0 @@
-Fix a bug on the java wrapper.
-
-Additionnal information at http://www.vtk.org/Bug/view.php?id=6723
----
-
- Wrapping/vtkWrapJava.c | 32 ++++++++++++++++++++++++++++++--
- 1 files changed, 30 insertions(+), 2 deletions(-)
-
-
-diff --git a/Wrapping/vtkWrapJava.c b/Wrapping/vtkWrapJava.c
-index 800c45b..98050c8 100644
---- a/Wrapping/vtkWrapJava.c
-+++ b/Wrapping/vtkWrapJava.c
-@@ -15,6 +15,7 @@
-
- #include <stdio.h>
- #include <string.h>
-+#include <stdlib.h>
- #include "vtkParse.h"
-
- int numberOfWrappedFunctions = 0;
-@@ -715,6 +716,9 @@ void outputFunction(FILE *fp, FileInfo *data)
- {
- int i;
- int args_ok = 1;
-+ char *jniFunction = 0;
-+ char *begPtr = 0;
-+ char *endPtr = 0;
- CurrentData = data;
-
- /* some functions will not get wrapped no matter what else */
-@@ -833,6 +837,26 @@ void outputFunction(FILE *fp, FileInfo *data)
- if (!DoneOne())
- {
- fprintf(fp,"\n");
-+
-+ /* Underscores are escaped in method names, see
-+ http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/design.html#wp133
-+ VTK class names contain no underscore and do not need to be escaped. */
-+ jniFunction = currentFunction->Name;
-+ begPtr = currentFunction->Name;
-+ endPtr = strchr(begPtr, '_');
-+ if(endPtr)
-+ {
-+ jniFunction = (char *)malloc(2*strlen(currentFunction->Name) + 1);
-+ jniFunction[0] = '\0';
-+ while (endPtr)
-+ {
-+ strncat(jniFunction, begPtr, endPtr - begPtr + 1);
-+ strcat(jniFunction, "1");
-+ begPtr = endPtr + 1;
-+ endPtr = strchr(begPtr, '_');
-+ }
-+ strcat(jniFunction, begPtr);
-+ }
-
- if(currentFunction->IsLegacy)
- {
-@@ -841,7 +865,7 @@ void outputFunction(FILE *fp, FileInfo *data)
- fprintf(fp,"extern \"C\" JNIEXPORT ");
- return_result(fp);
- fprintf(fp," JNICALL Java_vtk_%s_%s_1%i(JNIEnv *env, jobject obj",
-- data->ClassName,currentFunction->Name, numberOfWrappedFunctions);
-+ data->ClassName, jniFunction, numberOfWrappedFunctions);
-
- for (i = 0; i < currentFunction->NumberOfArguments; i++)
- {
-@@ -906,7 +930,7 @@ void outputFunction(FILE *fp, FileInfo *data)
- if (currentFunction->NumberOfArguments == 1 && currentFunction->ArgTypes[0] == 0x5000)
- {
- fprintf(fp," op->%sArgDelete(vtkJavaVoidFuncArgDelete);\n",
-- currentFunction->Name);
-+ jniFunction);
- }
-
- /* now copy and release any arrays */
-@@ -923,6 +947,10 @@ void outputFunction(FILE *fp, FileInfo *data)
-
- wrappedFunctions[numberOfWrappedFunctions] = currentFunction;
- numberOfWrappedFunctions++;
-+ if (jniFunction != currentFunction->Name)
-+ {
-+ free(jniFunction);
-+ }
- } /* isDone() */
- } /* isAbstract */
- }
View
22 vtk-util/patch/5.2/warning
@@ -1,22 +0,0 @@
-Work around a bug in object destructor
-
-
----
-
- Common/vtkObject.cxx | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-
-diff --git a/Common/vtkObject.cxx b/Common/vtkObject.cxx
-index b70f786..d189536 100644
---- a/Common/vtkObject.cxx
-+++ b/Common/vtkObject.cxx
-@@ -157,7 +157,7 @@ vtkObject::~vtkObject()
- // by another object
- if ( this->ReferenceCount > 0)
- {
-- vtkErrorMacro(<< "Trying to delete object with non-zero reference count.");
-+ vtkWarningMacro(<< "Trying to delete object with non-zero reference count.");
- }
- delete this->SubjectHelper;
- this->SubjectHelper = NULL;
View
8 vtk-util/patch/5.4/apply.sh
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Script that apply all the patchs in correct order to the VTK library.
-# You must be on the root of the VTK source directory when executing this script.
-
-scriptDir=$(dirname $0)
-
-[ -L patches ] || ln -s $scriptDir patches
-quilt push -a
View
134 vtk-util/patch/5.4/displayList
@@ -1,134 +0,0 @@
-Gain many time in pick color.
-
-Additionnal information at http://www.vtk.org/Bug/view.php?id=7111
----
-
- Rendering/vtkOpenGLDisplayListPainter.cxx | 15 +++++++++++----
- Rendering/vtkPainter.cxx | 5 +++++
- Rendering/vtkPainter.h | 17 +++++++++++++++++
- Rendering/vtkRenderer.cxx | 2 ++
- Rendering/vtkRenderer.h | 4 ++++
- 5 files changed, 39 insertions(+), 4 deletions(-)
-
-
-diff --git a/Rendering/vtkOpenGLDisplayListPainter.cxx b/Rendering/vtkOpenGLDisplayListPainter.cxx
-index fe33f58..81fb9a0 100644
---- a/Rendering/vtkOpenGLDisplayListPainter.cxx
-+++ b/Rendering/vtkOpenGLDisplayListPainter.cxx
-@@ -109,7 +109,13 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer *renderer,
- unsigned long typeflags,
- bool forceCompileOnly)
- {
-- if (this->GetMTime() > this->Internals->BuildTime ||
-+ long time = this->GetPreviousRenderingForSelection();
-+ if(time == 0)
-+ time = this->Internals->BuildTime;
-+ else
-+ time = renderer->GetRenderTime();
-+
-+ if ((this->GetMTime() > time && time == this->Internals->BuildTime) ||
- (this->LastWindow && (renderer->GetRenderWindow() != this->LastWindow.GetPointer())))
- {
- // MTime changes when input changes or someother iVar changes, so display
-@@ -138,11 +144,12 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer *renderer,
- // typeflags are obsolete.
- if (
- // Since input changed
-- input->GetMTime() > this->Internals->BuildTime ||
-+ input->GetMTime() > time ||
- // actor's properties were modified
-- actor->GetProperty()->GetMTime() > this->Internals->BuildTime ||
-+ actor->GetProperty()->GetMTime() > time ||
- // mapper information was modified
-- this->Information->GetMTime() > this->Internals->BuildTime)
-+ //this->Information->GetMTime() > this->Internals->BuildTime
-+ false)
- {
- this->Internals->ReleaseAllLists();
- }
-diff --git a/Rendering/vtkPainter.cxx b/Rendering/vtkPainter.cxx
-index 0e24142..d1cd945 100644
---- a/Rendering/vtkPainter.cxx
-+++ b/Rendering/vtkPainter.cxx
-@@ -85,6 +85,8 @@ vtkPainter::vtkPainter()
- this->SetInformation(temp);
- temp->Delete();
-
-+ this->PreviousRenderingForSelection = 0;
-+
- vtkPainter::STATIC_DATA()->Set(this->Information, 0);
- vtkPainter::CONSERVE_MEMORY()->Set(this->Information, 0);
- vtkPainter::HIGH_QUALITY()->Set(this->Information, 1);
-@@ -211,6 +213,9 @@ void vtkPainter::Render(vtkRenderer* renderer, vtkActor* actor,
-
- this->PrepareForRendering(renderer, actor);
- this->RenderInternal(renderer, actor, typeflags,forceCompileOnly);
-+
-+ // If the previous rendering selection information exist remove it
-+ SetPreviousRenderingForSelection(0);
- }
-
- //-----------------------------------------------------------------------------
-diff --git a/Rendering/vtkPainter.h b/Rendering/vtkPainter.h
-index f22a2de..859d86e 100644
---- a/Rendering/vtkPainter.h
-+++ b/Rendering/vtkPainter.h
-@@ -149,6 +149,21 @@ public:
- virtual vtkDataObject* GetOutput()
- { return this->Input; }
-
-+ // Description:
-+ // If you're making a selection rendering please add the TimeStamp time of the
-+ // selection rendering.
-+ // If the value is equal to zero then the previous rendering is not a selection rendering.
-+ // If the value is different of zero then the previous rendering was a selection rendering.
-+ void SetPreviousRenderingForSelection(int value)
-+ {
-+ this->PreviousRenderingForSelection = value;
-+ }
-+
-+ int GetPreviousRenderingForSelection()
-+ {
-+ return this->PreviousRenderingForSelection;
-+ }
-+
- //BTX
- protected:
- vtkPainter();
-@@ -236,6 +251,8 @@ protected:
-
- double TimeToDraw;
- vtkTimerLog* Timer;
-+
-+ int PreviousRenderingForSelection;
-
- vtkWeakPointer<vtkWindow> LastWindow; // Window used for previous render.
- // This is not reference counted.
-diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
-index 5cd44ff..a0a0930 100644
---- a/Rendering/vtkRenderer.cxx
-+++ b/Rendering/vtkRenderer.cxx
-@@ -1946,6 +1946,8 @@ void vtkRenderer::SwapOutSelectablePainter(
- {
- orig_mapper->SetPainter(orig_painter);
- orig_painter->UnRegister(this);
-+ // Inform the painters that this rendering is a selection rendering
-+ orig_painter->SetPreviousRenderingForSelection(orig_mapper->GetMTime());
- }
- }
- if (!orig_painter)
-diff --git a/Rendering/vtkRenderer.h b/Rendering/vtkRenderer.h
-index 352e12e..3e1e726 100644
---- a/Rendering/vtkRenderer.h
-+++ b/Rendering/vtkRenderer.h
-@@ -441,6 +441,10 @@ public:
- vtkGetMacro(LastRenderingUsedDepthPeeling,int);
-
- // Description:
-+ // Last render time
-+ vtkGetMacro(RenderTime,int);
-+
-+ // Description:
- // Set/Get a custom Render call. Allows to hook a Render call from an
- // external project.It will be used in place of vtkRenderer::Render() if it
- // is not NULL and its Used ivar is set to true.
View
96 vtk-util/patch/5.4/getColorBufferSizes
@@ -1,96 +0,0 @@
-Allow wrapping of vtkRenderWindow::GetColorBufferSizes
-
-See http://www.vtk.org/Bug/view.php?id=7857
-
-When color depth is lower than 24, vtkVisibleCellSelector::Select()
-silently fails. We want to detect this case to provide
-a software alternative, or at least tell user why picking
-does not work.
----
-
- Rendering/vtkMesaRenderWindow.h | 1 +
- Rendering/vtkOpenGLRenderWindow.cxx | 17 +++++++++++++++++
- Rendering/vtkOpenGLRenderWindow.h | 1 +
- Rendering/vtkRenderWindow.h | 2 ++
- 4 files changed, 21 insertions(+), 0 deletions(-)
-
-
-diff --git a/Rendering/vtkMesaRenderWindow.h b/Rendering/vtkMesaRenderWindow.h
-index 6c5c9ad..790f570 100644
---- a/Rendering/vtkMesaRenderWindow.h
-+++ b/Rendering/vtkMesaRenderWindow.h
-@@ -108,6 +108,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- int GetColorBufferSizes(int *rgba);
-+ int GetColorBufferSizes(vtkIntArray *rgba);
-
- // Description:
- // Initialize OpenGL for this window.
-diff --git a/Rendering/vtkOpenGLRenderWindow.cxx b/Rendering/vtkOpenGLRenderWindow.cxx
-index 5b494d7..a18a198 100644
---- a/Rendering/vtkOpenGLRenderWindow.cxx
-+++ b/Rendering/vtkOpenGLRenderWindow.cxx
-@@ -17,6 +17,7 @@
- #include "vtkFloatArray.h"
- #include "vtkgl.h"
- #include "vtkIdList.h"
-+#include "vtkIntArray.h"
- #include "vtkObjectFactory.h"
- #include "vtkOpenGLActor.h"
- #include "vtkOpenGLCamera.h"
-@@ -379,6 +380,22 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int *rgba)
- }
- }
-
-+int vtkOpenGLRenderWindow::GetColorBufferSizes(vtkIntArray *rgba)
-+{
-+ if (rgba==NULL)
-+ {
-+ return 0;
-+ }
-+
-+ if ( rgba->GetMaxId()+1 != 4)
-+ {
-+ vtkDebugMacro("Resizing array.");
-+ rgba->SetNumberOfComponents(1);
-+ rgba->SetNumberOfValues(4);
-+ }
-+ return this->GetColorBufferSizes(rgba->GetPointer(0));
-+}
-+
- unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1,
- int x2, int y2,
- int front)
-diff --git a/Rendering/vtkOpenGLRenderWindow.h b/Rendering/vtkOpenGLRenderWindow.h
-index 69f1f6b..2ef8a9d 100644
---- a/Rendering/vtkOpenGLRenderWindow.h
-+++ b/Rendering/vtkOpenGLRenderWindow.h
-@@ -110,6 +110,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- int GetColorBufferSizes(int *rgba);
-+ int GetColorBufferSizes(vtkIntArray *rgba);
-
- // Description:
- // Initialize OpenGL for this window.
-diff --git a/Rendering/vtkRenderWindow.h b/Rendering/vtkRenderWindow.h
-index 20f1b75..1e344b3 100644
---- a/Rendering/vtkRenderWindow.h
-+++ b/Rendering/vtkRenderWindow.h
-@@ -41,6 +41,7 @@
- #include "vtkWindow.h"
-
- class vtkFloatArray;
-+class vtkIntArray;
- class vtkPainterDeviceAdapter;
- class vtkRenderWindowInteractor;
- class vtkRenderer;
-@@ -501,6 +502,7 @@ public:
- // Get the size of the color buffer.
- // Returns 0 if not able to determine otherwise sets R G B and A into buffer.
- virtual int GetColorBufferSizes(int *rgba) = 0;
-+ virtual int GetColorBufferSizes(vtkIntArray *rgba) = 0;
-
- // Description:
- // Get the vtkPainterDeviceAdapter which can be used to paint on
View
30 vtk-util/patch/5.4/javaFixWeakRef
@@ -1,30 +0,0 @@
-vtkObjectBase.Delete() corrupts vtkGlobalJavaHash
-
-The Java garbage collector (called GC in this bugreport) removes weak references from vtkGlobalJavaHash.PointerToReference when it deletes unused objects.
-This is all good. Buf if vtkObjectBase.Delete() is called explicitly (which is recommended in Java to avoid threading issues), vtkGlobalJavaHash.PointerToReference is not updated and contains an invalid entry, old vtkId points to an object which has been deleted from native code but not yet GC'ed.
-If native code reuses the same address before object is GC'ed, vtkGlobalJavaHash.PointerToReference.get(vtkId) will return this object instead of null.
-Here is a test case to reproduce this bug, output is:
-Exception in thread "main" java.lang.ClassCastException: vtk.vtkQuadric cannot be cast to vtk.vtkDataArray
- at vtk.vtkDataArray.CreateDataArray(vtkDataArray.java:267)
- at BugWeakRef.main(BugWeakRef.java:21)
-
-Patch applies against VTK 5.4 and current CVS HEAD.
-See http://www.vtk.org/Bug/view.php?id=8942
----
-
- Wrapping/vtkParseJava.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-
-diff --git a/Wrapping/vtkParseJava.c b/Wrapping/vtkParseJava.c
-index f9b0235..19d46a0 100644
---- a/Wrapping/vtkParseJava.c
-+++ b/Wrapping/vtkParseJava.c
-@@ -669,6 +669,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
- fprintf(fp,"\n protected native void VTKRegister();");
- fprintf(fp,"\n public void Delete() {");
- fprintf(fp,"\n int refCount = this.GetReferenceCount();");
-+ fprintf(fp,"\n vtkGlobalJavaHash.PointerToReference.remove(new Long(this.vtkId));");
- fprintf(fp,"\n this.VTKDelete();");
- fprintf(fp,"\n this.vtkDeleted = true;");
- fprintf(fp,"\n if (refCount == 1) {");
View
281 vtk-util/patch/5.4/offset
@@ -1,281 +0,0 @@
-Make different polygon offset for each mappers.
-
-By default VTK use statics members so the offset parameters are shared by all the mappers.
-See http://www.vtk.org/Bug/view.php?id=7294
----
-
- Rendering/vtkMapper.cxx | 69 ++++----------------
- Rendering/vtkMapper.h | 63 ++++++++++++------
- Rendering/vtkOpenGLImageActor.cxx | 11 +++
- .../Testing/Cxx/TestOrientationMarkerWidget.cxx | 2 -
- 4 files changed, 65 insertions(+), 80 deletions(-)
-
-
-diff --git a/Rendering/vtkMapper.cxx b/Rendering/vtkMapper.cxx
-index 5d01b1d..5526284 100644
---- a/Rendering/vtkMapper.cxx
-+++ b/Rendering/vtkMapper.cxx
-@@ -27,13 +27,6 @@ vtkCxxRevisionMacro(vtkMapper, "$Revision$");
- // Initialize static member that controls global immediate mode rendering
- static int vtkMapperGlobalImmediateModeRendering = 0;
-
--// Initialize static member that controls global coincidence resolution
--static int vtkMapperGlobalResolveCoincidentTopology = VTK_RESOLVE_OFF;
--static double vtkMapperGlobalResolveCoincidentTopologyZShift = 0.01;
--static double vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor = 1.0;
--static double vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits = 1.0;
--static int vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces = 1;
--
- // Construct with initial range (0,1).
- vtkMapper::vtkMapper()
- {
-@@ -66,6 +59,12 @@ vtkMapper::vtkMapper()
- this->ColorTextureMap = 0;
-
- this->ForceCompileOnly=0;
-+
-+ this->ResolveCoincidentTopology = VTK_RESOLVE_OFF;
-+ this->ResolveCoincidentTopologyZShift = 0.01;
-+ this->ResolveCoincidentTopologyPolygonOffsetFactor = 1.0;
-+ this->ResolveCoincidentTopologyPolygonOffsetUnits = 1.0;
-+ this->ResolveCoincidentTopologyPolygonOffsetFaces = 1;
- }
-
- vtkMapper::~vtkMapper()
-@@ -142,66 +141,28 @@ int vtkMapper::GetGlobalImmediateModeRendering()
- return vtkMapperGlobalImmediateModeRendering;
- }
-
--void vtkMapper::SetResolveCoincidentTopology(int val)
--{
-- if (val == vtkMapperGlobalResolveCoincidentTopology)
-- {
-- return;
-- }
-- vtkMapperGlobalResolveCoincidentTopology = val;
--}
--
--int vtkMapper::GetResolveCoincidentTopology()
--{
-- return vtkMapperGlobalResolveCoincidentTopology;
--}
--
- void vtkMapper::SetResolveCoincidentTopologyToDefault()
- {
-- vtkMapperGlobalResolveCoincidentTopology = VTK_RESOLVE_OFF;
--}
--
--void vtkMapper::SetResolveCoincidentTopologyZShift(double val)
--{
-- if (val == vtkMapperGlobalResolveCoincidentTopologyZShift)
-- {
-- return;
-- }
-- vtkMapperGlobalResolveCoincidentTopologyZShift = val;
--}
--
--double vtkMapper::GetResolveCoincidentTopologyZShift()
--{
-- return vtkMapperGlobalResolveCoincidentTopologyZShift;
-+ this->ResolveCoincidentTopology = VTK_RESOLVE_OFF;
- }
-
- void vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(
- double factor, double units)
- {
-- if (factor == vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor &&
-- units == vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits )
-+ if (factor == this->ResolveCoincidentTopologyPolygonOffsetFactor &&
-+ units == this->ResolveCoincidentTopologyPolygonOffsetUnits )
- {
- return;
- }
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor = factor;
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits = units;
-+ this->ResolveCoincidentTopologyPolygonOffsetFactor = factor;
-+ this->ResolveCoincidentTopologyPolygonOffsetUnits = units;
- }
-
- void vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(
- double& factor, double& units)
- {
-- factor = vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFactor;
-- units = vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetUnits;
--}
--
--void vtkMapper::SetResolveCoincidentTopologyPolygonOffsetFaces(int faces)
--{
-- vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces = faces;
--}
--
--int vtkMapper::GetResolveCoincidentTopologyPolygonOffsetFaces()
--{
-- return vtkMapperGlobalResolveCoincidentTopologyPolygonOffsetFaces;
-+ factor = this->ResolveCoincidentTopologyPolygonOffsetFactor;
-+ units = this->ResolveCoincidentTopologyPolygonOffsetUnits;
- }
-
- // Overload standard modified time function. If lookup table is modified,
-@@ -719,11 +680,11 @@ void vtkMapper::PrintSelf(ostream& os, vtkIndent indent)
- os << indent << "RenderTime: " << this->RenderTime << endl;
-
- os << indent << "Resolve Coincident Topology: ";
-- if ( vtkMapperGlobalResolveCoincidentTopology == VTK_RESOLVE_OFF )
-+ if ( this->ResolveCoincidentTopology == VTK_RESOLVE_OFF )
- {
- os << "Off" << endl;
- }
-- else if ( vtkMapperGlobalResolveCoincidentTopology == VTK_RESOLVE_POLYGON_OFFSET )
-+ else if ( this->ResolveCoincidentTopology == VTK_RESOLVE_POLYGON_OFFSET )
- {
- os << "Polygon Offset" << endl;
- }
-diff --git a/Rendering/vtkMapper.h b/Rendering/vtkMapper.h
-index 264511d..3022e3e 100644
---- a/Rendering/vtkMapper.h
-+++ b/Rendering/vtkMapper.h
-@@ -276,41 +276,26 @@ public:
- // approach, you may also want to set the ResolveCoincidentTopologyZShift
- // value. (Note: not all mappers/graphics systems implement this
- // functionality.)
-- static void SetResolveCoincidentTopology(int val);
-- static int GetResolveCoincidentTopology();
-- static void SetResolveCoincidentTopologyToDefault();
-- static void SetResolveCoincidentTopologyToOff()
-+ /*void SetResolveCoincidentTopology(int val);
-+ int GetResolveCoincidentTopology();*/
-+ void SetResolveCoincidentTopologyToDefault();
-+ void SetResolveCoincidentTopologyToOff()
- {SetResolveCoincidentTopology(VTK_RESOLVE_OFF);}
-- static void SetResolveCoincidentTopologyToPolygonOffset()
-+ void SetResolveCoincidentTopologyToPolygonOffset()
- {SetResolveCoincidentTopology(VTK_RESOLVE_POLYGON_OFFSET);}
-- static void SetResolveCoincidentTopologyToShiftZBuffer()
-+ void SetResolveCoincidentTopologyToShiftZBuffer()
- {SetResolveCoincidentTopology(VTK_RESOLVE_SHIFT_ZBUFFER);}
-
- // Description:
- // Used to set the polygon offset scale factor and units.
- // Used when ResolveCoincidentTopology is set to PolygonOffset.
- // These are global variables.
-- static void SetResolveCoincidentTopologyPolygonOffsetParameters(
-+ void SetResolveCoincidentTopologyPolygonOffsetParameters(
- double factor, double units);
-- static void GetResolveCoincidentTopologyPolygonOffsetParameters(
-+ void GetResolveCoincidentTopologyPolygonOffsetParameters(
- double& factor, double& units);
-
- // Description:
-- // Used when ResolveCoincidentTopology is set to PolygonOffset. The polygon
-- // offset can be applied either to the solid polygonal faces or the
-- // lines/vertices. When set (default), the offset is applied to the faces
-- // otherwise it is applied to lines and vertices.
-- // This is a global variable.
-- static void SetResolveCoincidentTopologyPolygonOffsetFaces(int faces);
-- static int GetResolveCoincidentTopologyPolygonOffsetFaces();
--
-- // Description:
-- // Used to set the z-shift if ResolveCoincidentTopology is set to
-- // ShiftZBuffer. This is a global variable.
-- static void SetResolveCoincidentTopologyZShift(double val);
-- static double GetResolveCoincidentTopologyZShift();
--
-- // Description:
- // Return bounding box (array of six doubles) of data expressed as
- // (xmin,xmax, ymin,ymax, zmin,zmax).
- virtual double *GetBounds();
-@@ -360,6 +345,31 @@ public:
- void SetScalarMaterialModeToAmbientAndDiffuse()
- {this->SetScalarMaterialMode(VTK_MATERIALMODE_AMBIENT_AND_DIFFUSE);};
-
-+ // controls coincidence resolution
-+ vtkSetMacro(ResolveCoincidentTopology, int);
-+ vtkGetMacro(ResolveCoincidentTopology, int);
-+
-+ // Description:
-+ // Used to set the z-shift if ResolveCoincidentTopology is set to
-+ // ShiftZBuffer. This is a global variable.
-+ vtkSetMacro(ResolveCoincidentTopologyZShift, double);
-+ vtkGetMacro(ResolveCoincidentTopologyZShift, double);
-+
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetFactor, double);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetFactor, double);
-+
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetUnits, double);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetUnits, double);
-+
-+ // Description:
-+ // Used when ResolveCoincidentTopology is set to PolygonOffset. The polygon
-+ // offset can be applied either to the solid polygonal faces or the
-+ // lines/vertices. When set (default), the offset is applied to the faces
-+ // otherwise it is applied to lines and vertices.
-+ // This is a global variable.
-+ vtkSetMacro(ResolveCoincidentTopologyPolygonOffsetFaces, int);
-+ vtkGetMacro(ResolveCoincidentTopologyPolygonOffsetFaces, int);
-+
- // Description:
- // Return the light-model color mode.
- const char *GetScalarMaterialModeAsString();
-@@ -395,6 +405,13 @@ protected:
- int ScalarMode;
- int ScalarMaterialMode;
-
-+ // Controls coincidence resolution
-+ int ResolveCoincidentTopology;
-+ double ResolveCoincidentTopologyZShift;
-+ double ResolveCoincidentTopologyPolygonOffsetFactor;
-+ double ResolveCoincidentTopologyPolygonOffsetUnits;
-+ int ResolveCoincidentTopologyPolygonOffsetFaces;
-+
- double RenderTime;
-
- // for coloring by a component of a field data array
-diff --git a/Rendering/vtkOpenGLImageActor.cxx b/Rendering/vtkOpenGLImageActor.cxx
-index ba6aaec..bc53fd1 100644
---- a/Rendering/vtkOpenGLImageActor.cxx
-+++ b/Rendering/vtkOpenGLImageActor.cxx
-@@ -314,6 +314,11 @@ unsigned char *vtkOpenGLImageActor::MakeDataSuitable(int &xsize, int &ysize,
- return res;
- }
-
-+#include <iostream>
-+#include <cassert>
-+
-+using namespace std;
-+
- // Implement base class method.
- void vtkOpenGLImageActor::Load(vtkRenderer *ren)
- {
-@@ -457,7 +462,9 @@ void vtkOpenGLImageActor::Load(vtkRenderer *ren)
-
-
- // draw the quad
-- if ( vtkMapper::GetResolveCoincidentTopology() )
-+ cerr << "You should rewrite the polygon offSet of vtkOpenGLImageActor !" << endl;
-+ assert(0);
-+ /*if ( vtkMapper::GetResolveCoincidentTopology() )
- {
- if ( vtkMapper::GetResolveCoincidentTopology() ==
- VTK_RESOLVE_SHIFT_ZBUFFER )
-@@ -472,7 +479,7 @@ void vtkOpenGLImageActor::Load(vtkRenderer *ren)
- glPolygonOffset(f,u);
- #endif
- }
-- }
-+ }*/
- glDisable(GL_COLOR_MATERIAL);
- glDisable (GL_CULL_FACE);
- glDisable( GL_LIGHTING );
-diff --git a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-index 628a587..9910e84 100644
---- a/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-+++ b/Widgets/Testing/Cxx/TestOrientationMarkerWidget.cxx
-@@ -461,7 +461,7 @@ int TestOrientationMarkerWidget( int argc, char *argv[] )
- // this static function improves the appearance of the text edges
- // since they are overlaid on a surface rendering of the cube's faces
- //
-- vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-+ //vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-
- // anatomic labelling
- //
View
22 vtk-util/patch/5.4/parseJava
@@ -1,22 +0,0 @@
-Improve Print() to help debugging
-
-See http://www.vtk.org/Bug/view.php?id=7886
----
-
- Wrapping/vtkParseJava.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-
-diff --git a/Wrapping/vtkParseJava.c b/Wrapping/vtkParseJava.c
-index 9944ef1..f9b0235 100644
---- a/Wrapping/vtkParseJava.c
-+++ b/Wrapping/vtkParseJava.c
-@@ -708,7 +708,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
- /* Add the PrintRevisions method to vtkObject. */
- fprintf(fp," public native String PrintRevisions();\n");
- /* Add the default toString from java object */
-- fprintf(fp," public String toString() { return Print(); }\n");
-+ fprintf(fp," public String toString() { return getClass().getName()+\"@\"+Integer.toHexString(hashCode())+\" \"+Print(); }\n");
- }
-
- if (!strcmp("vtkObject",data->ClassName))
View
8 vtk-util/patch/5.4/series
@@ -1,8 +0,0 @@
-# This series applies on GIT commit eeada9a6eba343228b7657fdfb9636ebffbc6901
-displayList
-offset
-translucent
-warning
-getColorBufferSizes
-parseJava
-javaFixWeakRef
View
85 vtk-util/patch/5.4/translucent
@@ -1,85 +0,0 @@
-Allow picking translucent objects
-
-See http://www.vtk.org/Bug/view.php?id=7295
----
-
- Rendering/vtkRenderer.cxx | 23 +++++++++++++++++++++++
- Rendering/vtkRenderer.h | 9 +++++++++
- 2 files changed, 32 insertions(+), 0 deletions(-)
-
-
-diff --git a/Rendering/vtkRenderer.cxx b/Rendering/vtkRenderer.cxx
-index a0a0930..cee73e0 100644
---- a/Rendering/vtkRenderer.cxx
-+++ b/Rendering/vtkRenderer.cxx
-@@ -129,6 +129,8 @@ vtkRenderer::vtkRenderer()
- this->MaximumNumberOfPeels=4;
- this->LastRenderingUsedDepthPeeling=0;
-
-+ this->PickTranslucent=0;
-+
- this->Selector = 0;
- this->Delegate=0;
- this->Pass=0;
-@@ -1842,6 +1844,25 @@ int vtkRenderer::UpdateGeometryForSelection()
- return 0;
- }
-
-+ // Check if there is translucent geometry
-+ // do the render library specific stuff about translucent polygonal geometry.
-+ // As it can be expensive, do a quick check if we can skip this step
-+ int hasTranslucentPolygonalGeometry=0;
-+ if(PickTranslucent)
-+ {
-+ for ( i = 0; !hasTranslucentPolygonalGeometry && i < this->PropArrayCount;
-+ i++ )
-+ {
-+ hasTranslucentPolygonalGeometry=
-+ this->PropArray[i]->HasTranslucentPolygonalGeometry();
-+ }
-+ // Have to be set before a call to UpdateTranslucentPolygonalGeometry()
-+ // because UpdateTranslucentPolygonalGeometry() will eventually call
-+ // vtkOpenGLActor::Render() that uses this flag.
-+ if(hasTranslucentPolygonalGeometry)
-+ this->LastRenderingUsedDepthPeeling=0;
-+ }
-+
- // loop through props and give them a chance to
- // render themselves as opaque geometry
- for ( i = 0; i < this->PropArrayCount; i++ )
-@@ -1869,6 +1890,8 @@ int vtkRenderer::UpdateGeometryForSelection()
- {
- this->NumberOfPropsRendered +=
- this->PropArray[i]->RenderOpaqueGeometry(this);
-+ if(hasTranslucentPolygonalGeometry != 0 && this->PropArray[i]->HasTranslucentPolygonalGeometry())
-+ this->PropArray[i]->RenderTranslucentPolygonalGeometry(this);
- }
-
- //restore the prop's original settings
-diff --git a/Rendering/vtkRenderer.h b/Rendering/vtkRenderer.h
-index 3e1e726..03dc185 100644
---- a/Rendering/vtkRenderer.h
-+++ b/Rendering/vtkRenderer.h
-@@ -439,6 +439,12 @@ public:
- // actually used depth peeling.
- // Initial value is false.
- vtkGetMacro(LastRenderingUsedDepthPeeling,int);
-+
-+ // Description:
-+ // Turn on/off the selection of translucents actors.
-+ vtkSetMacro(PickTranslucent,int);
-+ vtkGetMacro(PickTranslucent,int);
-+ vtkBooleanMacro(PickTranslucent,int);
-
- // Description:
- // Last render time
-@@ -612,6 +618,9 @@ protected:
- // actually used depth peeling.
- // Initial value is false.
- int LastRenderingUsedDepthPeeling;
-+
-+ // Tells if the translucent actors can be picked.
-+ int PickTranslucent;
-
- #if !defined(VTK_LEGACY_REMOVE)
- // VISIBLE CELL SELECTION ----------------------------------------
View
22 vtk-util/patch/5.4/warning
@@ -1,22 +0,0 @@
-Work around a bug in object destructor
-
-
----
-
- Common/vtkObject.cxx | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-
-diff --git a/Common/vtkObject.cxx b/Common/vtkObject.cxx
-index b70f786..d189536 100644
---- a/Common/vtkObject.cxx
-+++ b/Common/vtkObject.cxx
-@@ -157,7 +157,7 @@ vtkObject::~vtkObject()
- // by another object
- if ( this->ReferenceCount > 0)
- {
-- vtkErrorMacro(<< "Trying to delete object with non-zero reference count.");
-+ vtkWarningMacro(<< "Trying to delete object with non-zero reference count.");
- }
- delete this->SubjectHelper;
- this->SubjectHelper = NULL;

0 comments on commit 1271752

Please sign in to comment.
Something went wrong with that request. Please try again.