Commit 2bc3308b authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Deprecate vtkOpenGLPolyDataMapper.

Deprecated vtkOpenGLPolyDataMapper. Added it to the coverage exclude list. Also
removed a test TestOpenGLPolyDataMapper since vtkOpenGLPolyDataMapper is
deprecated anyways.

Change-Id: I087eaf21b8cff22d1184b5725b72158a54f6a65e
parent 2b090ee9
......@@ -310,6 +310,9 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude files from the Utilities directories
".*/Utilities/.*"
".*/ThirdParty/.*"
# Exclude vtkOpenGLPolyDataMapper since the class is deprecated since VTK 6.2.
".*vtkOpenGLPolyDataMapper.*"
)
IF(@CMAKE_COMPILER_IS_GNUCXX@)
......
......@@ -249,8 +249,6 @@ void vtkChooserPainter::SelectPainters(vtkRenderer *vtkNotUsed(renderer),
lineptype = "vtkLinesPainter";
polyptype = "vtkPolygonsPainter";
stripptype = "vtkTStripsPainter";
// No elaborate selection as yet.
// Merely create the pipeline as the vtkOpenGLPolyDataMapper.
}
//-----------------------------------------------------------------------------
......
......@@ -52,7 +52,6 @@ vtk_add_test_cxx(
TestOffAxisStereo.cxx
TestOrderedTriangulator.cxx
TestOpacity.cxx
TestOpenGLPolyDataMapper.cxx
TestOSConeCxx.cxx
TestPolygonSelection.cxx
TestPOVExporter.cxx,NO_VALID
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestOpenGLPolyDataMapper.cxx
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.
=========================================================================*/
// .NAME Test of vtkLabelPlacementMapper
// .SECTION Description
// this program tests vtkLabelPlacementMapper which uses a sophisticated algorithm to
// prune labels/icons preventing them from overlapping.
#include <vtkSphereSource.h>
#include <vtkPolyData.h>
#include <vtkSmartPointer.h>
#include <vtkOpenGLPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkTestUtilities.h>
#include <vtkRegressionTestImage.h>
int TestOpenGLPolyDataMapper(int argc, char *argv[])
{
//Create a sphere
vtkSmartPointer<vtkSphereSource> sphereSource =
vtkSmartPointer<vtkSphereSource>::New();
sphereSource->SetCenter(0.0, 0.0, 0.0);
sphereSource->SetRadius(5.0);
//Create a mapper and actor
vtkSmartPointer<vtkOpenGLPolyDataMapper> mapper =
vtkSmartPointer<vtkOpenGLPolyDataMapper>::New();
mapper->SetInputConnection(sphereSource->GetOutputPort());
vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
//Create a renderer, render window, and interactor
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> interactor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
interactor->SetRenderWindow(renderWindow);
//Add the actor to the scene
renderer->AddActor(actor);
renderer->SetBackground(.3, .6, .3); // Background color green
//Render and interact
renderWindow->Render();
int retVal = vtkRegressionTestImage(renderWindow);
if(retVal == vtkRegressionTester::DO_INTERACTOR)
{
interactor->Start();
}
return !retVal;
}
......@@ -20,7 +20,6 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkOpenGLActor.h"
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLLight.h"
#include "vtkOpenGLPolyDataMapper.h"
#include "vtkOpenGLProperty.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLTexture.h"
......
......@@ -19,7 +19,6 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLLight.h"
#include "vtkOpenGLActor.h"
#include "vtkOpenGLPolyDataMapper.h"
#include <GL/gl.h>
#include "vtkgl.h"
......
......@@ -14,6 +14,8 @@
=========================================================================*/
#include "vtkOpenGLPolyDataMapper.h"
#if !defined(VTK_LEGACY_REMOVE)
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkCommand.h"
......@@ -62,6 +64,9 @@ vtkOpenGLPolyDataMapper::vtkOpenGLPolyDataMapper()
this->ListId = 0;
this->TotalCells = 0;
this->InternalColorTexture = 0;
VTK_LEGACY_BODY(vtkOpenGLPolyDataMapper::vtkOpenGLPolyDataMapper,
"VTK 6.2");
}
// Destructor (don't call ReleaseGraphicsResources() since it is virtual
......@@ -2107,3 +2112,5 @@ void vtkOpenGLPolyDataMapper::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}
#endif // VTK_LEGACY_REMOVE
......@@ -17,6 +17,7 @@
// vtkOpenGLPolyDataMapper is a subclass of vtkPolyDataMapper.
// vtkOpenGLPolyDataMapper is a geometric PolyDataMapper for the OpenGL
// rendering library.
// @deprecated Replaced by vtkPainterPolyDataMapper as of VTK 6.2.
#ifndef __vtkOpenGLPolyDataMapper_h
#define __vtkOpenGLPolyDataMapper_h
......@@ -32,7 +33,7 @@ class vtkProperty;
class vtkRenderWindow;
class vtkOpenGLRenderer;
class vtkOpenGLTexture;
#if !defined(VTK_LEGACY_REMOVE)
class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
{
public:
......@@ -108,5 +109,5 @@ private:
vtkOpenGLPolyDataMapper(const vtkOpenGLPolyDataMapper&); // Not implemented.
void operator=(const vtkOpenGLPolyDataMapper&); // Not implemented.
};
#endif // VTK_LEGACY_REMOVE
#endif
......@@ -23,7 +23,6 @@
#include "vtkOpenGLExtensionManager.h"
#include "vtkOpenGLHardwareSupport.h"
#include "vtkOpenGLLight.h"
#include "vtkOpenGLPolyDataMapper.h"
#include "vtkOpenGLProperty.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLError.h"
......
......@@ -20,7 +20,6 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkOpenGLActor.h"
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLLight.h"
#include "vtkOpenGLPolyDataMapper.h"
#include "vtkOpenGLProperty.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLTexture.h"
......
......@@ -20,7 +20,6 @@
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLLight.h"
#include "vtkOpenGLActor.h"
#include "vtkOpenGLPolyDataMapper.h"
#include "vtkXRenderWindowInteractor.h"
#include "vtkOpenGL.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment