VTK
vtkValuePassHelper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkValuePassHelper.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=========================================================================*/
37#ifndef vtkValuePassHelper_h
38#define vtkValuePassHelper_h
39
40#include "vtkRenderingOpenGL2Module.h" // For export macro
41#include "vtkObject.h"
42
43
44class vtkActor;
45class vtkDataSet;
46class vtkMapper;
47class vtkOpenGLHelper;
48class vtkRenderer;
49class vtkWindow;
50class vtkPolyData;
51
52class VTKRENDERINGOPENGL2_EXPORT vtkValuePassHelper : public vtkObject
53{
55
56public:
57
60 void PrintSelf(ostream& os, vtkIndent indent);
61
62protected:
63
66
67 vtkGetMacro(RenderingMode, int);
68
74 vtkPolyData* input);
75
79 void RenderPieceStart(vtkActor* actor, vtkDataSet* input);
80
84 void UpdateShaders(std::string & VSSource, std::string & FSSource,
85 std::string & required);
86
88
94
99
104
106
107private:
108
109 void AllocateGraphicsResources(vtkRenderer* ren);
110
111 vtkValuePassHelper(const vtkValuePassHelper &) VTK_DELETE_FUNCTION;
112 void operator=(const vtkValuePassHelper &) VTK_DELETE_FUNCTION;
113
114
115 class vtkInternals;
116 vtkInternals* Impl;
117 int RenderingMode;
118};
119#endif // vtkValuePassHelper_h
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
abstract base class for most VTK objects
Definition: vtkObject.h:60
a PolyDataMapper for the OpenGL library
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract specification for renderers
Definition: vtkRenderer.h:64
Implementation of both rendering modes of vtkValuePass for the vtkOpenGLPolyDataMapper.
static vtkValuePassHelper * New()
void UpdateConfiguration(vtkRenderer *ren, vtkActor *act, vtkMapper *mapper, vtkPolyData *input)
Configure the internal state depending on the settings defined by the vtkValuePass (RenderingMode,...
void RenderPieceStart(vtkActor *actor, vtkDataSet *input)
Upload new data if necessary, bind textures, etc.
void BindAttributes(vtkOpenGLHelper &cellBO)
Bind shader variables.
void BindUniforms(vtkOpenGLHelper &cellBO)
bool RequiresShaderRebuild()
Query whether a shader rebuild will be required.
void RenderPieceFinish()
Unbind textures, etc.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void UpdateShaders(std::string &VSSource, std::string &FSSource, std::string &required)
Add necessary shader definitions.
void ReleaseGraphicsResources(vtkWindow *win)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ string
Definition: vtkX3D.h:490