VTK  9.1.0
vtkOpenGLPolyDataMapper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
36#ifndef vtkOpenGLPolyDataMapper_h
37#define vtkOpenGLPolyDataMapper_h
38
39#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
40#include "vtkInformation.h" // for prim struct
41#include "vtkNew.h" // For vtkNew
42#include "vtkOpenGLHelper.h" // used for ivars
43#include "vtkPolyDataMapper.h"
44#include "vtkRenderingOpenGL2Module.h" // For export macro
45#include "vtkShader.h" // for methods
46#include "vtkStateStorage.h" // used for ivars
47
48#include <map> // for map
49#include <tuple> // for tuple
50#include <vector> // for vector
51
52class vtkCellArray;
54class vtkMatrix4x4;
55class vtkMatrix3x3;
62class vtkPoints;
63class vtkTexture;
65class vtkTransform;
67
68class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
69{
70public:
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
78 void RenderPiece(vtkRenderer* ren, vtkActor* act) override;
79
81
84 virtual void RenderPieceStart(vtkRenderer* ren, vtkActor* act);
85 virtual void RenderPieceDraw(vtkRenderer* ren, vtkActor* act);
86 virtual void RenderPieceFinish(vtkRenderer* ren, vtkActor* act);
88
95
96 vtkGetMacro(PopulateSelectionSettings, int);
97 void SetPopulateSelectionSettings(int v) { this->PopulateSelectionSettings = v; }
98
105 bool GetSupportsSelection() override { return true; }
106
107 // used by RenderPiece and functions it calls to reduce
108 // calls to get the input and allow for rendering of
109 // other polydata (not the input)
111
113
119 vtkSetStringMacro(PointIdArrayName);
120 vtkGetStringMacro(PointIdArrayName);
121 vtkSetStringMacro(CellIdArrayName);
122 vtkGetStringMacro(CellIdArrayName);
124
126
131 vtkSetStringMacro(ProcessIdArrayName);
132 vtkGetStringMacro(ProcessIdArrayName);
134
136
145 vtkSetStringMacro(CompositeIdArrayName);
146 vtkGetStringMacro(CompositeIdArrayName);
148
150
160 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::AddShaderReplacement")
161 void AddShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
162 const std::string& originalValue,
163 bool replaceFirst, // do this replacement before the default
164 const std::string& replacementValue, bool replaceAll);
165 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearShaderReplacement")
166 void ClearShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
167 const std::string& originalValue, bool replaceFirst);
168 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
169 void ClearAllShaderReplacements(vtkShader::Type shaderType);
170 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
171 void ClearAllShaderReplacements();
173
175
183 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetVertexShaderCode")
184 virtual void SetVertexShaderCode(const char* code);
185 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetVertexShaderCode")
186 virtual char* GetVertexShaderCode();
187 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetFragmentShaderCode")
188 virtual void SetFragmentShaderCode(const char* code);
189 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetFragmentShaderCode")
190 virtual char* GetFragmentShaderCode();
191 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetGeometryShaderCode")
192 virtual void SetGeometryShaderCode(const char* code);
193 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetGeometryShaderCode")
194 virtual char* GetGeometryShaderCode();
196
200 void ShallowCopy(vtkAbstractMapper* m) override;
201
203 vtkGetObjectMacro(VBOs, vtkOpenGLVertexBufferObjectGroup);
204
208 virtual void SetVBOShiftScaleMethod(int m);
209 virtual int GetVBOShiftScaleMethod() { return this->ShiftScaleMethod; }
210
225 virtual void SetPauseShiftScale(bool pauseShiftScale) { this->PauseShiftScale = pauseShiftScale; }
226 vtkGetMacro(PauseShiftScale, bool);
227 vtkBooleanMacro(PauseShiftScale, bool);
228
230 {
231 PrimitiveStart = 0,
232 PrimitivePoints = 0,
237 PrimitiveEnd
238 };
239
251 void MapDataArrayToVertexAttribute(const char* vertexAttributeName, const char* dataArrayName,
252 int fieldAssociation, int componentno = -1) override;
253
254 // This method will Map the specified data array for use as
255 // a texture coordinate for texture tname. The actual
256 // attribute will be named tname_coord so as to not
257 // conflict with the texture sampler definition which will
258 // be tname.
259 void MapDataArrayToMultiTextureAttribute(const char* tname, const char* dataArrayName,
260 int fieldAssociation, int componentno = -1) override;
261
265 void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
266
271
277 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
278
279protected:
282
284
285 void MapDataArray(const char* vertexAttributeName, const char* dataArrayName,
286 const char* texturename, int fieldAssociation, int componentno);
287
288 // what coordinate should be used for this texture
289 std::string GetTextureCoordinateName(const char* tname);
290
291 // handle updating shift scale based on pose changes
292 virtual void UpdateCameraShiftScale(vtkRenderer* ren, vtkActor* actor);
293
297 void GetCoincidentParameters(vtkRenderer* ren, vtkActor* actor, float& factor, float& offset);
298
304 void ComputeBounds() override;
305
310 virtual void UpdateShaders(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
311
316
320 virtual void BuildShaders(
321 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
322
326 virtual void GetShaderTemplate(
327 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
328
333 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
334
336
341 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act, bool prePass);
343 std::map<vtkShader::Type, vtkShader*> shaders, vtkActor* act);
344 virtual void ReplaceShaderColor(
345 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
346 virtual void ReplaceShaderEdges(
347 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
348 virtual void ReplaceShaderLight(
349 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
351 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
353 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
355 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
357 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
358 virtual void ReplaceShaderClip(
359 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
361 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
363 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
364 virtual void ReplaceShaderDepth(
365 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
367
371 virtual void SetCustomUniforms(vtkOpenGLHelper& cellBO, vtkActor* actor);
372
377
382 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
383
388
393 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
394
398 virtual void UpdateBufferObjects(vtkRenderer* ren, vtkActor* act);
399
404
408 virtual void BuildBufferObjects(vtkRenderer* ren, vtkActor* act);
409
413 virtual void BuildIBO(vtkRenderer* ren, vtkActor* act, vtkPolyData* poly);
414
418 virtual void BuildSelectionIBO(
419 vtkPolyData* poly, std::vector<unsigned int> (&indices)[4], vtkIdType offset);
420
424 virtual void BuildSelectionCache(const char* arrayName, bool selectingPoints, vtkPolyData* poly);
425
426 // The VBO and its layout.
428
429 // Structures for the various cell types we render.
430 vtkOpenGLHelper Primitives[PrimitiveEnd];
431 vtkOpenGLHelper SelectionPrimitives[PrimitiveEnd];
434 bool DrawingSelection = false;
436 vtkMTimeType SelectionTime = 0;
437
438 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
441 bool SelectionCacheForPoints = false;
442 vtkMTimeType SelectionCacheTime = 0;
443 vtkPolyData* SelectionPolyData = nullptr;
444
445 // do we have wide lines that require special handling
447
448 // do we have textures that require special handling
449 virtual bool HaveTextures(vtkActor* actor);
450
451 // how many textures do we have
452 virtual unsigned int GetNumberOfTextures(vtkActor* actor);
453
454 // populate a vector with the textures we have
455 // the order is always
456 // ColorInternalTexture
457 // Actors texture
458 // Properties textures
459 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(vtkActor* actor);
460
461 // do we have textures coordinates that require special handling
462 virtual bool HaveTCoords(vtkPolyData* poly);
463
464 // values we use to determine if we need to rebuild shaders
465 // stored in a map keyed on the vtkOpenGLHelper, so one
466 // typically entry per type of primitive we render which
467 // matches the shader programs we use
469 {
470 public:
474
475 // Caches the vtkOpenGLRenderPass::RenderPasses() information.
476 // Note: Do not dereference the pointers held by this object. There is no
477 // guarantee that they are still valid!
479 };
480 std::map<const vtkOpenGLHelper*, primitiveInfo> PrimitiveInfo;
481
485
486 // Check the renderpasses in actor's property keys to see if they've changed
487 // render stages:
489
491 vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
492 vtkStateStorage VBOBuildState; // used for determining when to rebuild the VBO
493 vtkStateStorage IBOBuildState; // used for determining whento rebuild the IBOs
495 vtkStateStorage TempState; // can be used to avoid constant allocs/deallocs
497
500
505 int ShiftScaleMethod; // for points
507
508 // if set to true, tcoords will be passed to the
509 // VBO even if the mapper knows of no texture maps
510 // normally tcoords are only added to the VBO if the
511 // mapper has identified a texture map as well.
513
514 virtual void BuildCellTextures(
515 vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation);
516
517 void AppendCellTextures(vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation,
518 std::vector<unsigned char>& colors, std::vector<float>& normals, vtkPolyData* pd,
520
527
530 std::vector<unsigned char> EdgeValues;
532
533 // additional picking indirection
538
540 {
541 public:
542 std::string DataArrayName;
545 std::string TextureName;
546 };
547 std::map<std::string, ExtraAttributeValue> ExtraAttributes;
548
549 // Store shader properties on this class by legacy shader replacement functions
550 // This should disappear when the functions are deprecated
551 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
553 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
555
557
558 // are we currently drawing spheres/tubes
560 bool DrawingTubes(vtkOpenGLHelper& cellBO, vtkActor* actor);
562
563 // get which opengl mode to use to draw the primitive
564 int GetOpenGLMode(int representation, int primType);
565
566 // get how big to make the points when doing point picking
567 // typically 2 for points, 4 for lines, 6 for surface
569
570 // used to occasionally invoke timers
571 unsigned int TimerQueryCounter;
572
573 // stores the mapping from vtk cells to gl_PrimitiveId
575
576 // compute and set the maximum point and cell ID used in selection
578
579 void AddPointIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
580 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
581 void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
582 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
583
584 vtkNew<vtkCellArray> SelectionArrays[4];
585
586private:
588 void operator=(const vtkOpenGLPolyDataMapper&) = delete;
589};
590
591#endif
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:55
object to represent cell connectivity
Definition: vtkCellArray.h:190
a simple class to control print indentation
Definition: vtkIndent.h:43
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:43
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:45
Allocate and hold a VTK object.
Definition: vtkNew.h:65
OpenGL buffer object.
OpenGL rendering utility functions.
PolyDataMapper using OpenGL to render.
virtual void BuildSelectionCache(const char *arrayName, bool selectingPoints, vtkPolyData *poly)
Build the selection cache, used to map value ids to indices values.
void MapDataArrayToMultiTextureAttribute(const char *tname, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
virtual void ReplaceShaderRenderPass(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act, bool prePass)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void SetLightingShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to lighting, called by UpdateShader.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
virtual void ReplaceShaderPrimID(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void GetShaderTemplate(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Create the basic shaders before replacement.
std::map< const vtkOpenGLHelper *, primitiveInfo > PrimitiveInfo
virtual bool GetNeedToRebuildShaders(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Does the shader source need to be recomputed.
bool DrawingTubes(vtkOpenGLHelper &cellBO, vtkActor *actor)
vtkOpenGLBufferObject * CellScalarBuffer
virtual void RenderPieceStart(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
virtual void SetPauseShiftScale(bool pauseShiftScale)
Pause per-render updates to VBO shift+scale parameters.
void RenderPiece(vtkRenderer *ren, vtkActor *act) override
Implemented by sub classes.
virtual std::vector< std::pair< vtkTexture *, std::string > > GetTextures(vtkActor *actor)
void ComputeBounds() override
Called in GetBounds().
std::string GetTextureCoordinateName(const char *tname)
vtkOpenGLRenderTimer * TimerQuery
virtual void BuildIBO(vtkRenderer *ren, vtkActor *act, vtkPolyData *poly)
Build the IBO, called by BuildBufferObjects.
virtual void ReplaceShaderCustomUniforms(std::map< vtkShader::Type, vtkShader * > shaders, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
bool DrawingTubesOrSpheres(vtkOpenGLHelper &cellBO, vtkActor *actor)
virtual void ReplaceShaderTCoord(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void UpdateShaders(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Make sure appropriate shaders are defined, compiled and bound.
virtual void ReplaceShaderLight(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void ReplaceShaderCoincidentOffset(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void AddPointIdsToSelectionPrimitives(vtkPolyData *poly, const char *arrayName, unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId)
vtkTextureObject * CellScalarTexture
virtual void SetCustomUniforms(vtkOpenGLHelper &cellBO, vtkActor *actor)
Set the value of user-defined uniform variables, called by UpdateShader.
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the Camera, called by UpdateShader.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates.
virtual bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Does the VBO/IBO need to be rebuilt.
virtual void SetPropertyShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the property, called by UpdateShader.
virtual void ReplaceShaderEdges(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual bool HaveWideLines(vtkRenderer *, vtkActor *)
virtual void BuildShaders(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Build the shader source code, called by UpdateShader.
void AppendCellTextures(vtkRenderer *ren, vtkActor *, vtkCellArray *prims[4], int representation, std::vector< unsigned char > &colors, std::vector< float > &normals, vtkPolyData *pd, vtkOpenGLCellToVTKCellMap *ccmap)
vtkOpenGLShaderProperty * GetLegacyShaderProperty()
vtkSmartPointer< vtkOpenGLShaderProperty > LegacyShaderProperty
vtkTextureObject * CellNormalTexture
virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameters related to the mapper/input data, called by UpdateShader.
vtkMTimeType GetRenderPassStageMTime(vtkActor *actor, const vtkOpenGLHelper *cellBO)
virtual void UpdateMaximumPointCellIds(vtkRenderer *ren, vtkActor *actor)
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
bool DrawingSpheres(vtkOpenGLHelper &cellBO, vtkActor *actor)
vtkNew< vtkOpenGLCellToVTKCellMap > CellCellMap
virtual void RenderPieceFinish(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
virtual void ReplaceShaderDepth(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
vtkOpenGLTexture * InternalColorTexture
virtual void ReplaceShaderClip(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
int GetPointPickingPrimitiveSize(int primType)
vtkOpenGLBufferObject * CellNormalBuffer
virtual void BuildSelectionIBO(vtkPolyData *poly, std::vector< unsigned int >(&indices)[4], vtkIdType offset)
Build the selection IBO, called by UpdateBufferObjects.
std::vector< unsigned char > EdgeValues
std::map< std::string, ExtraAttributeValue > ExtraAttributes
virtual void RenderPieceDraw(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
vtkOpenGLBufferObject * EdgeBuffer
virtual void UpdateCameraShiftScale(vtkRenderer *ren, vtkActor *actor)
virtual unsigned int GetNumberOfTextures(vtkActor *actor)
void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel, std::vector< unsigned int > &pixeloffsets, vtkProp *prop) override
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
virtual void ReplaceShaderPositionVC(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void ReplaceShaderNormal(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
vtkNew< vtkTransform > VBOInverseTransform
vtkOpenGLVertexBufferObjectGroup * VBOs
void MapDataArray(const char *vertexAttributeName, const char *dataArrayName, const char *texturename, int fieldAssociation, int componentno)
virtual bool DrawingEdges(vtkRenderer *, vtkActor *)
vtkNew< vtkMatrix4x4 > VBOShiftScale
virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Build the VBO/IBO, called by UpdateBufferObjects.
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
void RemoveVertexAttributeMapping(const char *vertexAttributeName) override
Remove a vertex attribute mapping.
static vtkOpenGLPolyDataMapper * New()
void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
Select a data array from the point/cell data and map it to a generic vertex attribute.
virtual void ReplaceShaderPicking(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void GetCoincidentParameters(vtkRenderer *ren, vtkActor *actor, float &factor, float &offset)
helper function to get the appropriate coincident params
virtual bool HaveTCoords(vtkPolyData *poly)
int GetOpenGLMode(int representation, int primType)
virtual void ReplaceShaderColor(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void RemoveAllVertexAttributeMappings() override
Remove all vertex attributes.
~vtkOpenGLPolyDataMapper() override
std::map< std::tuple< unsigned int, unsigned int, vtkIdType >, std::vector< vtkIdType > > SelectionCache
virtual bool HaveTextures(vtkActor *actor)
virtual void UpdateBufferObjects(vtkRenderer *ren, vtkActor *act)
Update the VBO/IBO to be current.
virtual void BuildCellTextures(vtkRenderer *ren, vtkActor *, vtkCellArray *prims[4], int representation)
void AddCellIdsToSelectionPrimitives(vtkPolyData *poly, const char *arrayName, unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId)
Asynchronously measures GPU execution time for a single event.
represent GPU shader properties
OpenGL texture map.
manage vertex buffer objects shared within a mapper
represent and manipulate 3D points
Definition: vtkPoints.h:43
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:66
abstract specification for renderers
Definition: vtkRenderer.h:82
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:47
Hold a reference to a vtkObjectBase instance.
Class to make storing and comparing state quick and easy.
abstracts an OpenGL texture object.
handles properties associated with a texture map
Definition: vtkTexture.h:75
record modification and/or execution time
Definition: vtkTimeStamp.h:42
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
#define VTK_DEPRECATED_IN_9_0_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287