Commit 4b3da320 authored by Ken Martin's avatar Ken Martin

convert ImageMapper

Change-Id: I722d59f4e6b63371c63c238d4e09f293b7450255
parent 337b7ec2
......@@ -19,6 +19,7 @@ set(Module_SRCS
vtkglVertexArrayObject.cxx
vtkOpenGL2Actor.cxx
vtkOpenGL2Camera.cxx
vtkOpenGL2ImageMapper.cxx
vtkOpenGL2ImageSliceMapper.cxx
vtkOpenGL2Glyph3DMapper.cxx
vtkOpenGL2HardwareSelector.cxx
......@@ -103,6 +104,7 @@ if(VTK_REPLACE_OPENGL_OVERRIDES)
Actor
Camera
HardwareSelector
ImageMapper
ImageSliceMapper
Glyph3DMapper
Light
......
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2ImageMapper.h
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 vtkOpenGL2ImageMapper - 2D image display support for OpenGL
// .SECTION Description
// vtkOpenGL2ImageMapper is a concrete subclass of vtkImageMapper that
// renders images under OpenGL
// .SECTION Caveats
// vtkOpenGL2ImageMapper does not support vtkBitArray, you have to convert the array first
// to vtkUnsignedCharArray (for example)
//
// .SECTION See Also
// vtkImageMapper
#ifndef __vtkOpenGL2ImageMapper_h
#define __vtkOpenGL2ImageMapper_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkImageMapper.h"
class vtkActor2D;
class vtkTexturedActor2D;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2ImageMapper : public vtkImageMapper
{
public:
static vtkOpenGL2ImageMapper *New();
vtkTypeMacro(vtkOpenGL2ImageMapper, vtkImageMapper);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Handle the render method.
void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor)
{ this->RenderStart(viewport, actor); }
// Description:
// Called by the Render function in vtkImageMapper. Actually draws
// the image to the screen.
void RenderData(vtkViewport* viewport, vtkImageData* data,
vtkActor2D* actor);
// Description:
// draw the data once it has been converted to uchar, windowed leveled
// used internally by the templated functions
void DrawPixels(vtkViewport *vp, int width, int height, int numComponents, void *data);
protected:
vtkOpenGL2ImageMapper();
~vtkOpenGL2ImageMapper();
vtkTexturedActor2D *Actor;
private:
vtkOpenGL2ImageMapper(const vtkOpenGL2ImageMapper&); // Not implemented.
void operator=(const vtkOpenGL2ImageMapper&); // Not implemented.
};
#endif
......@@ -884,8 +884,8 @@ void vtkOpenGL2ImageSliceMapper::Render(vtkRenderer *ren, vtkImageSlice *prop)
// and now enable/disable as needed for our render
// glDisable(GL_CULL_FACE);
// glDisable(GL_COLOR_MATERIAL);
// glDisable(GL_CULL_FACE);
// glDisable(GL_COLOR_MATERIAL);
// do an offset to avoid depth buffer issues
if (vtkMapper::GetResolveCoincidentTopology() !=
......
......@@ -23,7 +23,6 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkPointData.h"
#include "vtkCellArray.h"
#include "vtkTrivialProducer.h"
#include "vtkActor2D.h"
#include "vtkTexturedActor2D.h"
#include "vtkglVBOHelper.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