Commit a6a584b1 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell

Very judicious use of sed, vtkOpenGL2* -> vtkOpenGL*

This now gives us a vtkRenderingOpenGL2 that has most of the same
classes as vtkRenderingOpenGL - the two will clobber each other's
headers, symbols etc and so can never be built/linked at the same
time.

Unfortunately a lot of classes SafeDownCast or dynamic_cast to the
derived OpenGL forms of the classes in vtkRenderingCore, and so
using a different class name presented significant issues despite
the fact that these classes are (in an ideal world) implementations
of the API in vtkRenderingCore for OpenGL 2.1 and above.

Change-Id: Ie8c6234621e550d3fd67da732d2cf4839290d665
parent b40b181d
......@@ -32,21 +32,21 @@ set(Module_SRCS
vtkglShaderProgram.cxx
vtkglVertexArrayObject.cxx
vtkFrameBufferObject.cxx
vtkOpenGL2Actor.cxx
vtkOpenGL2Camera.cxx
vtkOpenGL2ImageMapper.cxx
vtkOpenGL2ImageSliceMapper.cxx
vtkOpenGL2Glyph3DMapper.cxx
vtkOpenGL2HardwareSelector.cxx
vtkOpenGL2Light.cxx
vtkOpenGL2PolyDataMapper2D.cxx
vtkOpenGL2Property.cxx
vtkOpenGLActor.cxx
vtkOpenGLCamera.cxx
vtkOpenGLImageMapper.cxx
vtkOpenGLImageSliceMapper.cxx
vtkOpenGLGlyph3DMapper.cxx
vtkOpenGLHardwareSelector.cxx
vtkOpenGLLight.cxx
vtkOpenGLPolyDataMapper2D.cxx
vtkOpenGLProperty.cxx
vtkVBOPolyDataMapper.cxx
vtkOpenGL2RenderWindow.cxx
vtkOpenGL2Renderer.cxx
vtkOpenGL2ShaderCache.cxx
vtkOpenGL2Texture.cxx
vtkOpenGL2TextureUnitManager.cxx
vtkOpenGLRenderWindow.cxx
vtkOpenGLRenderer.cxx
vtkOpenGLShaderCache.cxx
vtkOpenGLTexture.cxx
vtkOpenGLTextureUnitManager.cxx
vtkPixelBufferObject.cxx
vtkRenderbuffer.cxx
vtkRenderPass.cxx
......@@ -114,7 +114,7 @@ if(VTK_USE_X)
endif()
set_source_files_properties(
vtkOpenGL2RenderWindow
vtkOpenGLRenderWindow
ABSTRACT
)
......@@ -140,7 +140,7 @@ if(VTK_REPLACE_OPENGL_OVERRIDES)
)
vtk_add_override(vtkPolyDataMapper vtkVBOPolyDataMapper)
foreach(_override ${opengl_overrides})
vtk_add_override(vtk${_override} vtkOpenGL2${_override})
vtk_add_override(vtk${_override} vtkOpenGL${_override})
endforeach()
# FIXME: Not sure that this is the best way to handle X...
......
......@@ -17,7 +17,7 @@
#include <GL/glew.h>
#include "vtkObjectFactory.h"
#include "vtkOpenGL2RenderWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkTextureObject.h"
#include "vtkRenderbuffer.h"
#include "vtkPixelBufferObject.h"
......@@ -118,8 +118,8 @@ void vtkFrameBufferObject::SetContext(vtkRenderWindow *renWin)
return;
}
// check for support
vtkOpenGL2RenderWindow *context
= vtkOpenGL2RenderWindow::SafeDownCast(renWin);
vtkOpenGLRenderWindow *context
= vtkOpenGLRenderWindow::SafeDownCast(renWin);
if ( !context
|| !this->LoadRequiredExtensions(renWin))
{
......
......@@ -12,12 +12,12 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGL2Actor.h"
#include "vtkOpenGLActor.h"
#include "vtkMapper.h"
#include "vtkMatrix4x4.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGL2Renderer.h"
#include "vtkOpenGLRenderer.h"
#include "vtkProperty.h"
#include "vtkOpenGLError.h"
#include "vtkRenderWindow.h"
......@@ -25,10 +25,10 @@
#include "vtkOpenGL.h"
#include <math.h>
vtkStandardNewMacro(vtkOpenGL2Actor);
vtkStandardNewMacro(vtkOpenGLActor);
// Actual actor render method.
void vtkOpenGL2Actor::Render(vtkRenderer *ren, vtkMapper *mapper)
void vtkOpenGLActor::Render(vtkRenderer *ren, vtkMapper *mapper)
{
vtkOpenGLClearErrorMacro();
......@@ -71,7 +71,7 @@ void vtkOpenGL2Actor::Render(vtkRenderer *ren, vtkMapper *mapper)
}
//----------------------------------------------------------------------------
void vtkOpenGL2Actor::PrintSelf(ostream& os, vtkIndent indent)
void vtkOpenGLActor::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}
......@@ -17,19 +17,19 @@
// vtkOpenGLActor is a concrete implementation of the abstract class vtkActor.
// vtkOpenGLActor interfaces to the OpenGL rendering library.
#ifndef __vtkOpenGL2Actor_h
#define __vtkOpenGL2Actor_h
#ifndef __vtkOpenGLActor_h
#define __vtkOpenGLActor_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkActor.h"
class vtkOpenGLRenderer;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2Actor : public vtkActor
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLActor : public vtkActor
{
public:
static vtkOpenGL2Actor *New();
vtkTypeMacro(vtkOpenGL2Actor, vtkActor);
static vtkOpenGLActor *New();
vtkTypeMacro(vtkOpenGLActor, vtkActor);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -37,12 +37,12 @@ public:
void Render(vtkRenderer *ren, vtkMapper *mapper);
protected:
vtkOpenGL2Actor() {}
~vtkOpenGL2Actor() {}
vtkOpenGLActor() {}
~vtkOpenGLActor() {}
private:
vtkOpenGL2Actor(const vtkOpenGL2Actor&); // Not implemented.
void operator=(const vtkOpenGL2Actor&); // Not implemented.
vtkOpenGLActor(const vtkOpenGLActor&); // Not implemented.
void operator=(const vtkOpenGLActor&); // Not implemented.
};
#endif
......@@ -11,23 +11,23 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGL2Camera.h"
#include "vtkOpenGLCamera.h"
#include "vtkMatrix4x4.h"
#include "vtkObjectFactory.h"
#include "vtkRenderer.h"
#include "vtkOutputWindow.h"
#include "vtkOpenGL2RenderWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGL.h"
#include <math.h>
vtkStandardNewMacro(vtkOpenGL2Camera);
vtkStandardNewMacro(vtkOpenGLCamera);
// Implement base class method.
void vtkOpenGL2Camera::Render(vtkRenderer *ren)
void vtkOpenGLCamera::Render(vtkRenderer *ren)
{
vtkOpenGLClearErrorMacro();
......@@ -35,7 +35,7 @@ void vtkOpenGL2Camera::Render(vtkRenderer *ren)
int usize, vsize;
vtkMatrix4x4 *matrix = vtkMatrix4x4::New();
vtkOpenGL2RenderWindow *win = vtkOpenGL2RenderWindow::SafeDownCast(ren->GetRenderWindow());
vtkOpenGLRenderWindow *win = vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
// find out if we should stereo render
this->Stereo = (ren->GetRenderWindow())->GetStereoRender();
......@@ -122,7 +122,7 @@ void vtkOpenGL2Camera::Render(vtkRenderer *ren)
}
//----------------------------------------------------------------------------
void vtkOpenGL2Camera::UpdateViewport(vtkRenderer *ren)
void vtkOpenGLCamera::UpdateViewport(vtkRenderer *ren)
{
vtkOpenGLClearErrorMacro();
......@@ -138,7 +138,7 @@ void vtkOpenGL2Camera::UpdateViewport(vtkRenderer *ren)
}
//----------------------------------------------------------------------------
void vtkOpenGL2Camera::PrintSelf(ostream& os, vtkIndent indent)
void vtkOpenGLCamera::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}
......@@ -16,19 +16,19 @@
// vtkOpenGLCamera is a concrete implementation of the abstract class
// vtkCamera. vtkOpenGLCamera interfaces to the OpenGL rendering library.
#ifndef __vtkOpenGL2Camera_h
#define __vtkOpenGL2Camera_h
#ifndef __vtkOpenGLCamera_h
#define __vtkOpenGLCamera_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkCamera.h"
class vtkOpenGL2Renderer;
class vtkOpenGLRenderer;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2Camera : public vtkCamera
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLCamera : public vtkCamera
{
public:
static vtkOpenGL2Camera *New();
vtkTypeMacro(vtkOpenGL2Camera, vtkCamera);
static vtkOpenGLCamera *New();
vtkTypeMacro(vtkOpenGLCamera, vtkCamera);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -38,11 +38,11 @@ public:
void UpdateViewport(vtkRenderer *ren);
protected:
vtkOpenGL2Camera() {}
~vtkOpenGL2Camera() {}
vtkOpenGLCamera() {}
~vtkOpenGLCamera() {}
private:
vtkOpenGL2Camera(const vtkOpenGL2Camera&); // Not implemented.
void operator=(const vtkOpenGL2Camera&); // Not implemented.
vtkOpenGLCamera(const vtkOpenGLCamera&); // Not implemented.
void operator=(const vtkOpenGLCamera&); // Not implemented.
};
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2Glyph3DMapper.cxx
Module: vtkOpenGLGlyph3DMapper.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGL2Glyph3DMapper.h"
#include "vtkOpenGLGlyph3DMapper.h"
#include "vtkActor.h"
#include "vtkBitArray.h"
......@@ -49,7 +49,7 @@ static T vtkClamp(T val, T min, T max)
return val;
}
class vtkOpenGL2Glyph3DMapper::vtkColorMapper : public vtkMapper
class vtkOpenGLGlyph3DMapper::vtkColorMapper : public vtkMapper
{
public:
vtkTypeMacro(vtkColorMapper, vtkMapper);
......@@ -58,7 +58,7 @@ public:
vtkUnsignedCharArray* GetColors() { return this->Colors; }
};
class vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperEntry
class vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry
{
public:
std::vector<unsigned char> Colors;
......@@ -66,32 +66,32 @@ public:
vtkTimeStamp BuildTime;
bool LastSelectingState;
vtkOpenGL2Glyph3DMapperEntry() { this->LastSelectingState = false; };
vtkOpenGLGlyph3DMapperEntry() { this->LastSelectingState = false; };
};
class vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperArray
class vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperArray
{
public:
std::map<const vtkDataSet *, vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperEntry *> Entries;
std::map<const vtkDataSet *, vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry *> Entries;
};
vtkStandardNewMacro(vtkOpenGL2Glyph3DMapper)
vtkStandardNewMacro(vtkOpenGLGlyph3DMapper)
// ---------------------------------------------------------------------------
// Construct object with scaling on, scaling mode is by scalar value,
// scale factor = 1.0, the range is (0,1), orient geometry is on, and
// orientation is by vector. Clamping and indexing are turned off. No
// initial sources are defined.
vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapper()
vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapper()
{
this->GlyphValues = new vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperArray();
this->GlyphValues = new vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperArray();
this->Mapper = vtkVBOPolyDataMapper::New();
this->Mapper->SetPopulateSelectionSettings(0);
this->LastWindow = 0;
}
// ---------------------------------------------------------------------------
vtkOpenGL2Glyph3DMapper::~vtkOpenGL2Glyph3DMapper()
vtkOpenGLGlyph3DMapper::~vtkOpenGLGlyph3DMapper()
{
if (this->GlyphValues)
{
......@@ -111,7 +111,7 @@ vtkOpenGL2Glyph3DMapper::~vtkOpenGL2Glyph3DMapper()
// Description:
// Send mapper ivars to sub-mapper.
// \pre mapper_exists: mapper!=0
void vtkOpenGL2Glyph3DMapper::CopyInformationToSubMapper(
void vtkOpenGLGlyph3DMapper::CopyInformationToSubMapper(
vtkVBOPolyDataMapper *mapper)
{
assert("pre: mapper_exists" && mapper!=0);
......@@ -130,7 +130,7 @@ void vtkOpenGL2Glyph3DMapper::CopyInformationToSubMapper(
mapper->SetImmediateModeRendering(this->ImmediateModeRendering);
}
void vtkOpenGL2Glyph3DMapper::SetupColorMapper()
void vtkOpenGLGlyph3DMapper::SetupColorMapper()
{
this->ColorMapper->ShallowCopy(this);
}
......@@ -139,7 +139,7 @@ void vtkOpenGL2Glyph3DMapper::SetupColorMapper()
// Description:
// Method initiates the mapping process. Generally sent by the actor
// as each frame is rendered.
void vtkOpenGL2Glyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor)
void vtkOpenGLGlyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor)
{
vtkOpenGLClearErrorMacro();
......@@ -234,7 +234,7 @@ void vtkOpenGL2Glyph3DMapper::Render(vtkRenderer *ren, vtkActor *actor)
}
// ---------------------------------------------------------------------------
void vtkOpenGL2Glyph3DMapper::Render(
void vtkOpenGLGlyph3DMapper::Render(
vtkRenderer* ren, vtkActor* actor, vtkDataSet* dataset)
{
vtkIdType numPts = dataset->GetNumberOfPoints();
......@@ -245,13 +245,13 @@ void vtkOpenGL2Glyph3DMapper::Render(
}
// lookup the values for this dataset
vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperEntry *entry;
vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry *entry;
bool building = true;
typedef std::map<const vtkDataSet *,vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperEntry *>::iterator GVIter;
typedef std::map<const vtkDataSet *,vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry *>::iterator GVIter;
GVIter found = this->GlyphValues->Entries.find(dataset);
if (found == this->GlyphValues->Entries.end())
{
entry = new vtkOpenGL2Glyph3DMapper::vtkOpenGL2Glyph3DMapperEntry();
entry = new vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry();
this->GlyphValues->Entries.insert(std::make_pair(dataset, entry));
}
else
......@@ -554,7 +554,7 @@ void vtkOpenGL2Glyph3DMapper::Render(
// ---------------------------------------------------------------------------
// Description:
// Release any graphics resources that are being consumed by this mapper.
void vtkOpenGL2Glyph3DMapper::ReleaseGraphicsResources(vtkWindow *window)
void vtkOpenGLGlyph3DMapper::ReleaseGraphicsResources(vtkWindow *window)
{
if (this->Mapper)
{
......@@ -563,7 +563,7 @@ void vtkOpenGL2Glyph3DMapper::ReleaseGraphicsResources(vtkWindow *window)
}
// ----------------------------------------------------------------------------
void vtkOpenGL2Glyph3DMapper::PrintSelf(ostream& os, vtkIndent indent)
void vtkOpenGLGlyph3DMapper::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2Glyph3DMapper.h
Module: vtkOpenGLGlyph3DMapper.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,19 +12,19 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkOpenGL2Glyph3DMapper - vtkOpenGLGlyph3D on the GPU.
// .NAME vtkOpenGLGlyph3DMapper - vtkOpenGLGlyph3D on the GPU.
// .SECTION Description
// Do the same job than vtkGlyph3D but on the GPU. For this reason, it is
// a mapper not a vtkPolyDataAlgorithm. Also, some methods of vtkOpenGLGlyph3D
// don't make sense in vtkOpenGL2Glyph3DMapper: GeneratePointIds, old-style
// don't make sense in vtkOpenGLGlyph3DMapper: GeneratePointIds, old-style
// SetSource, PointIdsName, IsPointVisible.
// .SECTION Implementation
//
// .SECTION See Also
// vtkOpenGLGlyph3D
#ifndef __vtkOpenGL2Glyph3DMapper_h
#define __vtkOpenGL2Glyph3DMapper_h
#ifndef __vtkOpenGLGlyph3DMapper_h
#define __vtkOpenGLGlyph3DMapper_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkGlyph3DMapper.h"
......@@ -34,12 +34,12 @@
class vtkVBOPolyDataMapper;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2Glyph3DMapper
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLGlyph3DMapper
: public vtkGlyph3DMapper
{
public:
static vtkOpenGL2Glyph3DMapper* New();
vtkTypeMacro(vtkOpenGL2Glyph3DMapper, vtkGlyph3DMapper);
static vtkOpenGLGlyph3DMapper* New();
vtkTypeMacro(vtkOpenGLGlyph3DMapper, vtkGlyph3DMapper);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -56,8 +56,8 @@ public:
protected:
//BTX
vtkOpenGL2Glyph3DMapper();
~vtkOpenGL2Glyph3DMapper();
vtkOpenGLGlyph3DMapper();
~vtkOpenGLGlyph3DMapper();
// Description:
// Send mapper ivars to sub-mapper.
......@@ -69,9 +69,9 @@ protected:
class vtkColorMapper;
vtkNew<vtkColorMapper> ColorMapper;
class vtkOpenGL2Glyph3DMapperEntry;
class vtkOpenGL2Glyph3DMapperArray;
vtkOpenGL2Glyph3DMapperArray *GlyphValues; // array of value for datasets
class vtkOpenGLGlyph3DMapperEntry;
class vtkOpenGLGlyph3DMapperArray;
vtkOpenGLGlyph3DMapperArray *GlyphValues; // array of value for datasets
vtkWeakPointer<vtkWindow> LastWindow; // Window used for previous render.
......@@ -80,8 +80,8 @@ protected:
vtkTimeStamp PainterUpdateTime;
private:
vtkOpenGL2Glyph3DMapper(const vtkOpenGL2Glyph3DMapper&); // Not implemented.
void operator=(const vtkOpenGL2Glyph3DMapper&); // Not implemented.
vtkOpenGLGlyph3DMapper(const vtkOpenGLGlyph3DMapper&); // Not implemented.
void operator=(const vtkOpenGLGlyph3DMapper&); // Not implemented.
virtual void Render(vtkRenderer*, vtkActor*, vtkDataSet*);
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2HardwareSelector.cxx
Module: vtkOpenGLHardwareSelector.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,14 +12,14 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGL2HardwareSelector.h"
#include "vtkOpenGLHardwareSelector.h"
#include <GL/glew.h>
#include "vtkObjectFactory.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkOpenGL2RenderWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
......@@ -27,10 +27,10 @@
// Description:
// Internal state and helper methods.
class vtkOpenGL2HardwareSelector::vtkInternals
class vtkOpenGLHardwareSelector::vtkInternals
{
public:
vtkOpenGL2RenderWindow *Context;
vtkOpenGLRenderWindow *Context;
bool MultisampleSupport;
bool OriginalMultisample;
bool OriginalBlending;
......@@ -128,31 +128,31 @@ public:
};
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkOpenGL2HardwareSelector);
vtkStandardNewMacro(vtkOpenGLHardwareSelector);
//----------------------------------------------------------------------------
vtkOpenGL2HardwareSelector::vtkOpenGL2HardwareSelector()
vtkOpenGLHardwareSelector::vtkOpenGLHardwareSelector()
{
#ifdef vtkOpenGL2HardwareSelectorDEBUG
cerr << "=====vtkOpenGL2HardwareSelector::vtkOpenGL2HardwareSelector" << endl;
#ifdef vtkOpenGLHardwareSelectorDEBUG
cerr << "=====vtkOpenGLHardwareSelector::vtkOpenGLHardwareSelector" << endl;
#endif
this->Internals = new vtkInternals;
}
//----------------------------------------------------------------------------
vtkOpenGL2HardwareSelector::~vtkOpenGL2HardwareSelector()
vtkOpenGLHardwareSelector::~vtkOpenGLHardwareSelector()
{
#ifdef vtkOpenGL2HardwareSelectorDEBUG
cerr << "=====vtkOpenGL2HardwareSelector::~vtkOpenGL2HardwareSelector" << endl;
#ifdef vtkOpenGLHardwareSelectorDEBUG
cerr << "=====vtkOpenGLHardwareSelector::~vtkOpenGLHardwareSelector" << endl;
#endif
delete this->Internals;
}
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::BeginRenderProp(vtkRenderWindow *context)
void vtkOpenGLHardwareSelector::BeginRenderProp(vtkRenderWindow *context)
{
#ifdef vtkOpenGL2HardwareSelectorDEBUG
cerr << "=====vtkOpenGL2HardwareSelector::BeginRenderProp" << endl;
#ifdef vtkOpenGLHardwareSelectorDEBUG
cerr << "=====vtkOpenGLHardwareSelector::BeginRenderProp" << endl;
#endif
this->Internals->SetContext(context);
......@@ -166,10 +166,10 @@ void vtkOpenGL2HardwareSelector::BeginRenderProp(vtkRenderWindow *context)
}
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::EndRenderProp(vtkRenderWindow *)
void vtkOpenGLHardwareSelector::EndRenderProp(vtkRenderWindow *)
{
#ifdef vtkOpenGL2HardwareSelectorDEBUG
cerr << "=====vtkOpenGL2HardwareSelector::EndRenderProp" << endl;
#ifdef vtkOpenGLHardwareSelectorDEBUG
cerr << "=====vtkOpenGLHardwareSelector::EndRenderProp" << endl;
#endif
// Restore multisample, lighting, and blending.
......@@ -178,7 +178,7 @@ void vtkOpenGL2HardwareSelector::EndRenderProp(vtkRenderWindow *)
}
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::BeginRenderProp()
void vtkOpenGLHardwareSelector::BeginRenderProp()
{
this->InPropRender++;
if (this->InPropRender != 1)
......@@ -217,7 +217,7 @@ void vtkOpenGL2HardwareSelector::BeginRenderProp()
}
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::RenderCompositeIndex(unsigned int index)
void vtkOpenGLHardwareSelector::RenderCompositeIndex(unsigned int index)
{
if (index > 0xffffff)
......@@ -238,7 +238,7 @@ void vtkOpenGL2HardwareSelector::RenderCompositeIndex(unsigned int index)
//----------------------------------------------------------------------------
// TODO: make inline
void vtkOpenGL2HardwareSelector::RenderAttributeId(vtkIdType attribid)
void vtkOpenGLHardwareSelector::RenderAttributeId(vtkIdType attribid)
{
if (attribid < 0)
{
......@@ -272,7 +272,7 @@ void vtkOpenGL2HardwareSelector::RenderAttributeId(vtkIdType attribid)
}
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::RenderProcessId(unsigned int processid)
void vtkOpenGLHardwareSelector::RenderProcessId(unsigned int processid)
{
if (this->CurrentPass == PROCESS_PASS && this->UseProcessIdFromData)
{
......@@ -292,7 +292,7 @@ void vtkOpenGL2HardwareSelector::RenderProcessId(unsigned int processid)
//----------------------------------------------------------------------------
void vtkOpenGL2HardwareSelector::PrintSelf(ostream& os, vtkIndent indent)
void vtkOpenGLHardwareSelector::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2HardwareSelector.h
Module: vtkOpenGLHardwareSelector.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,26 +12,26 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkOpenGL2HardwareSelector - implements the device specific code of
// vtkOpenGL2HardwareSelector.
// .NAME vtkOpenGLHardwareSelector - implements the device specific code of
// vtkOpenGLHardwareSelector.
//
// .SECTION Description
// Implements the device specific code of vtkOpenGL2HardwareSelector.
// Implements the device specific code of vtkOpenGLHardwareSelector.
//
// .SECTION See Also
// vtkHardwareSelector
#ifndef __vtkOpenGL2HardwareSelector_h
#define __vtkOpenGL2HardwareSelector_h
#ifndef __vtkOpenGLHardwareSelector_h
#define __vtkOpenGLHardwareSelector_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkHardwareSelector.h"
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2HardwareSelector : public vtkHardwareSelector
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLHardwareSelector : public vtkHardwareSelector
{
public:
static vtkOpenGL2HardwareSelector* New();
vtkTypeMacro(vtkOpenGL2HardwareSelector, vtkHardwareSelector);
static vtkOpenGLHardwareSelector* New();
vtkTypeMacro(vtkOpenGLHardwareSelector, vtkHardwareSelector);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -55,8 +55,8 @@ public:
virtual void RenderProcessId(unsigned int processid);
protected:
vtkOpenGL2HardwareSelector();
virtual ~vtkOpenGL2HardwareSelector();
vtkOpenGLHardwareSelector();
virtual ~vtkOpenGLHardwareSelector();
// Called internally before and after each prop is rendered
// for device specific configuration/preparation etc.
......@@ -68,8 +68,8 @@ protected:
vtkInternals* Internals;
private:
vtkOpenGL2HardwareSelector(const vtkOpenGL2HardwareSelector&); // Not implemented.
void operator=(const vtkOpenGL2HardwareSelector&); // Not implemented.
vtkOpenGLHardwareSelector(const vtkOpenGLHardwareSelector&); // Not implemented.
void operator=(const vtkOpenGLHardwareSelector&); // Not implemented.
};
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2ImageMapper.cxx
Module: vtkOpenGLImageMapper.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkOpenGL2ImageMapper.h"
#include "vtkOpenGLImageMapper.h"
#include <GL/glew.h>
......@@ -40,9 +40,9 @@
#include "vtkOpenGLError.h"
vtkStandardNewMacro(vtkOpenGL2ImageMapper);
vtkStandardNewMacro(vtkOpenGLImageMapper);
vtkOpenGL2ImageMapper::vtkOpenGL2ImageMapper()
vtkOpenGLImageMapper::vtkOpenGLImageMapper()
{
this->Actor = vtkTexturedActor2D::New();
vtkNew<vtkPolyDataMapper2D> mapper;
......@@ -79,7 +79,7 @@ vtkOpenGL2ImageMapper::vtkOpenGL2ImageMapper()
polydata->GetPointData()->SetTCoords(tcoords.Get());
}
vtkOpenGL2ImageMapper::~vtkOpenGL2ImageMapper()
vtkOpenGLImageMapper::~vtkOpenGLImageMapper()
{
this->Actor->UnRegister(this);
}
......@@ -137,7 +137,7 @@ inline int vtkPadToFour(int n)
// 3) draw using DrawPixels
template <class T>
void vtkOpenGL2ImageMapperRenderDouble(vtkOpenGL2ImageMapper *self, vtkImageData *data,
void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper *self, vtkImageData *data,
T *dataPtr, double shift, double scale,
int *actorPos, int *actorPos2, int front, int *vsize,
vtkViewport *viewport)
......@@ -247,7 +247,7 @@ void vtkOpenGL2ImageMapperRenderDouble(vtkOpenGL2ImageMapper *self, vtkImageData
// overflow cannot occur.
template <class T>
void vtkOpenGL2ImageMapperRenderShort(vtkOpenGL2ImageMapper *self, vtkImageData *data,
void vtkOpenGLImageMapperRenderShort(vtkOpenGLImageMapper *self, vtkImageData *data,
T *dataPtr, double shift, double scale,
int *actorPos, int *actorPos2, int front,
int *vsize, vtkViewport *viewport)
......@@ -375,7 +375,7 @@ void vtkOpenGL2ImageMapperRenderShort(vtkOpenGL2ImageMapper *self, vtkImageData
// render unsigned char data without any shift/scale
template <class T>
void vtkOpenGL2ImageMapperRenderChar(vtkOpenGL2ImageMapper