VTK
vtkOpenGLPolyDataMapper2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLPolyDataMapper2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkOpenGLPolyDataMapper2D_h
27 #define vtkOpenGLPolyDataMapper2D_h
28 
29 #include "vtkRenderingOpenGL2Module.h" // For export macro
30 #include "vtkPolyDataMapper2D.h"
31 #include "vtkglVBOHelper.h" // used for ivars
32 
33 class vtkRenderer;
34 class vtkPoints;
35 
36 namespace vtkgl {class CellBO; }
37 
38 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper2D : public vtkPolyDataMapper2D
39 {
40 public:
43  virtual void PrintSelf(ostream& os, vtkIndent indent);
44 
46  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
47 
52 
53 protected:
56 
58  virtual bool GetNeedToRebuildShader(vtkgl::CellBO &cellBO, vtkViewport *ren, vtkActor2D *act);
59 
61 
62  virtual void BuildShader(std::string &VertexCode,
63  std::string &fragmentCode,
64  std::string &geometryCode,
65  vtkViewport *ren, vtkActor2D *act);
67 
69  virtual void UpdateShader(vtkgl::CellBO &cellBO, vtkViewport *viewport, vtkActor2D *act);
70 
73  virtual void SetMapperShaderParameters(vtkgl::CellBO &cellBO, vtkViewport *ren, vtkActor2D *act);
74 
75 
77  void SetCameraShaderParameters(vtkgl::CellBO &cellBO, vtkViewport *viewport, vtkActor2D *act);
78 
80  void SetPropertyShaderParameters(vtkgl::CellBO &cellBO, vtkViewport *viewport, vtkActor2D *act);
81 
83  void UpdateVBO(vtkActor2D *act, vtkViewport *viewport);
84 
85  // The VBO and its layout.
88 
89  // Structures for the various cell types we render.
94 
95  vtkTimeStamp VBOUpdateTime; // When was the VBO updated?
97 
98 private:
99  vtkOpenGLPolyDataMapper2D(const vtkOpenGLPolyDataMapper2D&); // Not implemented.
100  void operator=(const vtkOpenGLPolyDataMapper2D&); // Not implemented.
101 };
102 
103 #endif
OpenGL buffer object.
static vtkPolyDataMapper2D * New()
virtual void RenderOverlay(vtkViewport *, vtkActor2D *)
Definition: vtkMapper2D.h:40
abstract specification for Viewports
Definition: vtkViewport.h:46
a actor that draws 2D data
Definition: vtkActor2D.h:44
void PrintSelf(ostream &os, vtkIndent indent)
record modification and/or execution time
Definition: vtkTimeStamp.h:34
abstract specification for renderers
Definition: vtkRenderer.h:63
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
a simple class to control print indentation
Definition: vtkIndent.h:38
Definition: vtkgl.h:11267
virtual void ReleaseGraphicsResources(vtkWindow *)
GLsizei const GLchar ** string
Definition: vtkgl.h:12011
2D PolyData support for OpenGL
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38