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=========================================================================*/
27#ifndef vtkOpenGLPolyDataMapper_h
28#define vtkOpenGLPolyDataMapper_h
29
30#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
31#include "vtkInformation.h" // for prim struct
32#include "vtkNew.h" // For vtkNew
33#include "vtkOpenGLHelper.h" // used for ivars
34#include "vtkPolyDataMapper.h"
35#include "vtkRenderingOpenGL2Module.h" // For export macro
36#include "vtkShader.h" // for methods
37#include "vtkStateStorage.h" // used for ivars
38
39#include <map> // for map
40#include <tuple> // for tuple
41#include <vector> // for vector
42
43class vtkCellArray;
45class vtkMatrix4x4;
46class vtkMatrix3x3;
53class vtkPoints;
54class vtkTexture;
56class vtkTransform;
58
59class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
60{
61public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
69 void RenderPiece(vtkRenderer* ren, vtkActor* act) override;
70
72
75 virtual void RenderPieceStart(vtkRenderer* ren, vtkActor* act);
76 virtual void RenderPieceDraw(vtkRenderer* ren, vtkActor* act);
77 virtual void RenderPieceFinish(vtkRenderer* ren, vtkActor* act);
79
86
87 vtkGetMacro(PopulateSelectionSettings, int);
88 void SetPopulateSelectionSettings(int v) { this->PopulateSelectionSettings = v; }
89
96 bool GetSupportsSelection() override { return true; }
97
98 // used by RenderPiece and functions it calls to reduce
99 // calls to get the input and allow for rendering of
100 // other polydata (not the input)
102
104
110 vtkSetStringMacro(PointIdArrayName);
111 vtkGetStringMacro(PointIdArrayName);
112 vtkSetStringMacro(CellIdArrayName);
113 vtkGetStringMacro(CellIdArrayName);
115
117
122 vtkSetStringMacro(ProcessIdArrayName);
123 vtkGetStringMacro(ProcessIdArrayName);
125
127
136 vtkSetStringMacro(CompositeIdArrayName);
137 vtkGetStringMacro(CompositeIdArrayName);
139
141
151 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::AddShaderReplacement")
152 void AddShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
153 const std::string& originalValue,
154 bool replaceFirst, // do this replacement before the default
155 const std::string& replacementValue, bool replaceAll);
156 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearShaderReplacement")
157 void ClearShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
158 const std::string& originalValue, bool replaceFirst);
159 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
160 void ClearAllShaderReplacements(vtkShader::Type shaderType);
161 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
162 void ClearAllShaderReplacements();
164
166
174 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetVertexShaderCode")
175 virtual void SetVertexShaderCode(const char* code);
176 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetVertexShaderCode")
177 virtual char* GetVertexShaderCode();
178 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetFragmentShaderCode")
179 virtual void SetFragmentShaderCode(const char* code);
180 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetFragmentShaderCode")
181 virtual char* GetFragmentShaderCode();
182 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetGeometryShaderCode")
183 virtual void SetGeometryShaderCode(const char* code);
184 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetGeometryShaderCode")
185 virtual char* GetGeometryShaderCode();
187
191 void ShallowCopy(vtkAbstractMapper* m) override;
192
194 vtkGetObjectMacro(VBOs, vtkOpenGLVertexBufferObjectGroup);
195
199 virtual void SetVBOShiftScaleMethod(int m);
200 virtual int GetVBOShiftScaleMethod() { return this->ShiftScaleMethod; }
201
216 virtual void SetPauseShiftScale(bool pauseShiftScale) { this->PauseShiftScale = pauseShiftScale; }
217 vtkGetMacro(PauseShiftScale, bool);
218 vtkBooleanMacro(PauseShiftScale, bool);
219
221 {
222 PrimitiveStart = 0,
223 PrimitivePoints = 0,
228 PrimitiveEnd
229 };
230
242 void MapDataArrayToVertexAttribute(const char* vertexAttributeName, const char* dataArrayName,
243 int fieldAssociation, int componentno = -1) override;
244
245 // This method will Map the specified data array for use as
246 // a texture coordinate for texture tname. The actual
247 // attribute will be named tname_coord so as to not
248 // conflict with the texture sampler definition which will
249 // be tname.
250 void MapDataArrayToMultiTextureAttribute(const char* tname, const char* dataArrayName,
251 int fieldAssociation, int componentno = -1) override;
252
256 void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
257
262
268 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
269
270protected:
273
275
276 void MapDataArray(const char* vertexAttributeName, const char* dataArrayName,
277 const char* texturename, int fieldAssociation, int componentno);
278
279 // what coordinate should be used for this texture
281
282 // handle updating shift scale based on pose changes
283 virtual void UpdateCameraShiftScale(vtkRenderer* ren, vtkActor* actor);
284
288 void GetCoincidentParameters(vtkRenderer* ren, vtkActor* actor, float& factor, float& offset);
289
295 void ComputeBounds() override;
296
301 virtual void UpdateShaders(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
302
307
311 virtual void BuildShaders(
312 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
313
317 virtual void GetShaderTemplate(
318 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
319
324 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
325
327
332 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act, bool prePass);
334 std::map<vtkShader::Type, vtkShader*> shaders, vtkActor* act);
335 virtual void ReplaceShaderColor(
336 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
337 virtual void ReplaceShaderEdges(
338 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
339 virtual void ReplaceShaderLight(
340 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
342 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
344 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
346 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
348 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
349 virtual void ReplaceShaderClip(
350 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
352 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
354 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
355 virtual void ReplaceShaderDepth(
356 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
358
362 virtual void SetCustomUniforms(vtkOpenGLHelper& cellBO, vtkActor* actor);
363
368
373 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
374
379
384 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
385
389 virtual void UpdateBufferObjects(vtkRenderer* ren, vtkActor* act);
390
395
399 virtual void BuildBufferObjects(vtkRenderer* ren, vtkActor* act);
400
404 virtual void BuildIBO(vtkRenderer* ren, vtkActor* act, vtkPolyData* poly);
405
409 virtual void BuildSelectionIBO(
410 vtkPolyData* poly, std::vector<unsigned int> (&indices)[4], vtkIdType offset);
411
415 virtual void BuildSelectionCache(const char* arrayName, bool selectingPoints, vtkPolyData* poly);
416
417 // The VBO and its layout.
419
420 // Structures for the various cell types we render.
421 vtkOpenGLHelper Primitives[PrimitiveEnd];
422 vtkOpenGLHelper SelectionPrimitives[PrimitiveEnd];
425 bool DrawingSelection = false;
427 vtkMTimeType SelectionTime = 0;
428
429 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
432 bool SelectionCacheForPoints = false;
433 vtkMTimeType SelectionCacheTime = 0;
434 vtkPolyData* SelectionPolyData = nullptr;
435
436 // do we have wide lines that require special handling
438
439 // do we have textures that require special handling
440 virtual bool HaveTextures(vtkActor* actor);
441
442 // how many textures do we have
443 virtual unsigned int GetNumberOfTextures(vtkActor* actor);
444
445 // populate a vector with the textures we have
446 // the order is always
447 // ColorInternalTexture
448 // Actors texture
449 // Properties textures
450 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(vtkActor* actor);
451
452 // do we have textures coordinates that require special handling
453 virtual bool HaveTCoords(vtkPolyData* poly);
454
455 // values we use to determine if we need to rebuild shaders
456 // stored in a map keyed on the vtkOpenGLHelper, so one
457 // typically entry per type of primitive we render which
458 // matches the shader programs we use
460 {
461 public:
465
466 // Caches the vtkOpenGLRenderPass::RenderPasses() information.
467 // Note: Do not dereference the pointers held by this object. There is no
468 // guarantee that they are still valid!
470 };
471 std::map<const vtkOpenGLHelper*, primitiveInfo> PrimitiveInfo;
472
476
477 // Check the renderpasses in actor's property keys to see if they've changed
478 // render stages:
480
482 vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
483 vtkStateStorage VBOBuildState; // used for determining when to rebuild the VBO
484 vtkStateStorage IBOBuildState; // used for determining whento rebuild the IBOs
486 vtkStateStorage TempState; // can be used to avoid constant allocs/deallocs
488
491
496 int ShiftScaleMethod; // for points
498
499 // if set to true, tcoords will be passed to the
500 // VBO even if the mapper knows of no texture maps
501 // normally tcoords are only added to the VBO if the
502 // mapper has identified a texture map as well.
504
505 virtual void BuildCellTextures(
506 vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation);
507
508 void AppendCellTextures(vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation,
509 std::vector<unsigned char>& colors, std::vector<float>& normals, vtkPolyData* pd,
511
518
521 std::vector<unsigned char> EdgeValues;
523
524 // additional picking indirection
529
531 {
532 public:
537 };
538 std::map<std::string, ExtraAttributeValue> ExtraAttributes;
539
540 // Store shader properties on this class by legacy shader replacement functions
541 // This should disappear when the functions are deprecated
542 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
544 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
546
548
549 // are we currently drawing spheres/tubes
551 bool DrawingTubes(vtkOpenGLHelper& cellBO, vtkActor* actor);
553
554 // get which opengl mode to use to draw the primitive
555 int GetOpenGLMode(int representation, int primType);
556
557 // get how big to make the points when doing point picking
558 // typically 2 for points, 4 for lines, 6 for surface
560
561 // used to occasionally invoke timers
562 unsigned int TimerQueryCounter;
563
564 // stores the mapping from vtk cells to gl_PrimitiveId
566
567 // compute and set the maximum point and cell ID used in selection
569
570 void AddPointIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
571 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
572 void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
573 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
574
575 vtkNew<vtkCellArray> SelectionArrays[4];
576
577private:
579 void operator=(const vtkOpenGLPolyDataMapper&) = delete;
580};
581
582#endif
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
object to represent cell connectivity
Definition: vtkCellArray.h:181
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:34
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
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:34
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
abstract specification for renderers
Definition: vtkRenderer.h:73
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:38
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:66
record modification and/or execution time
Definition: vtkTimeStamp.h:33
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
@ offset
Definition: vtkX3D.h:444
@ string
Definition: vtkX3D.h:496
#define VTK_DEPRECATED_IN_9_0_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287