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=========================================================================*/
110#ifndef vtkOpenGLPolyDataMapper_h
111#define vtkOpenGLPolyDataMapper_h
112
113#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
114#include "vtkInformation.h" // for prim struct
115#include "vtkNew.h" // For vtkNew
116#include "vtkOpenGLHelper.h" // used for ivars
117#include "vtkPolyDataMapper.h"
118#include "vtkRenderingOpenGL2Module.h" // For export macro
119#include "vtkShader.h" // for methods
120#include "vtkStateStorage.h" // used for ivars
121
122#include <map> // for map
123#include <tuple> // for tuple
124#include <vector> // for vector
125
126class vtkCellArray;
128class vtkMatrix4x4;
129class vtkMatrix3x3;
132class vtkOpenGLTexture;
136class vtkPoints;
137class vtkTexture;
138class vtkTextureObject;
139class vtkTransform;
141
142class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
143{
144public:
147 void PrintSelf(ostream& os, vtkIndent indent) override;
148
152 void RenderPiece(vtkRenderer* ren, vtkActor* act) override;
153
155
158 virtual void RenderPieceStart(vtkRenderer* ren, vtkActor* act);
159 virtual void RenderPieceDraw(vtkRenderer* ren, vtkActor* act);
160 virtual void RenderPieceFinish(vtkRenderer* ren, vtkActor* act);
162
169
170 vtkGetMacro(PopulateSelectionSettings, int);
171 void SetPopulateSelectionSettings(int v) { this->PopulateSelectionSettings = v; }
172
179 bool GetSupportsSelection() override { return true; }
180
181 // used by RenderPiece and functions it calls to reduce
182 // calls to get the input and allow for rendering of
183 // other polydata (not the input)
185
187
193 vtkSetStringMacro(PointIdArrayName);
194 vtkGetStringMacro(PointIdArrayName);
195 vtkSetStringMacro(CellIdArrayName);
196 vtkGetStringMacro(CellIdArrayName);
198
200
205 vtkSetStringMacro(ProcessIdArrayName);
206 vtkGetStringMacro(ProcessIdArrayName);
208
210
219 vtkSetStringMacro(CompositeIdArrayName);
220 vtkGetStringMacro(CompositeIdArrayName);
222
224
234 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::AddShaderReplacement")
235 void AddShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
236 const std::string& originalValue,
237 bool replaceFirst, // do this replacement before the default
238 const std::string& replacementValue, bool replaceAll);
239 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearShaderReplacement")
240 void ClearShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
241 const std::string& originalValue, bool replaceFirst);
242 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
243 void ClearAllShaderReplacements(vtkShader::Type shaderType);
244 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
245 void ClearAllShaderReplacements();
247
249
257 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetVertexShaderCode")
258 virtual void SetVertexShaderCode(const char* code);
259 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetVertexShaderCode")
260 virtual char* GetVertexShaderCode();
261 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetFragmentShaderCode")
262 virtual void SetFragmentShaderCode(const char* code);
263 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetFragmentShaderCode")
264 virtual char* GetFragmentShaderCode();
265 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetGeometryShaderCode")
266 virtual void SetGeometryShaderCode(const char* code);
267 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetGeometryShaderCode")
268 virtual char* GetGeometryShaderCode();
270
274 void ShallowCopy(vtkAbstractMapper* m) override;
275
277 vtkGetObjectMacro(VBOs, vtkOpenGLVertexBufferObjectGroup);
278
282 virtual void SetVBOShiftScaleMethod(int m);
283 virtual int GetVBOShiftScaleMethod() { return this->ShiftScaleMethod; }
284
299 virtual void SetPauseShiftScale(bool pauseShiftScale) { this->PauseShiftScale = pauseShiftScale; }
300 vtkGetMacro(PauseShiftScale, bool);
301 vtkBooleanMacro(PauseShiftScale, bool);
302
304 {
305 PrimitiveStart = 0,
306 PrimitivePoints = 0,
311 PrimitiveEnd
312 };
313
325 void MapDataArrayToVertexAttribute(const char* vertexAttributeName, const char* dataArrayName,
326 int fieldAssociation, int componentno = -1) override;
327
328 // This method will Map the specified data array for use as
329 // a texture coordinate for texture tname. The actual
330 // attribute will be named tname_coord so as to not
331 // conflict with the texture sampler definition which will
332 // be tname.
333 void MapDataArrayToMultiTextureAttribute(const char* tname, const char* dataArrayName,
334 int fieldAssociation, int componentno = -1) override;
335
339 void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
340
345
351 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
352
353protected:
356
358
359 void MapDataArray(const char* vertexAttributeName, const char* dataArrayName,
360 const char* texturename, int fieldAssociation, int componentno);
361
362 // what coordinate should be used for this texture
364
365 // handle updating shift scale based on pose changes
366 virtual void UpdateCameraShiftScale(vtkRenderer* ren, vtkActor* actor);
367
371 void GetCoincidentParameters(vtkRenderer* ren, vtkActor* actor, float& factor, float& offset);
372
378 void ComputeBounds() override;
379
384 virtual void UpdateShaders(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
385
390
394 virtual void BuildShaders(
395 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
396
400 virtual void GetShaderTemplate(
401 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
402
407 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
408
410
415 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act, bool prePass);
417 std::map<vtkShader::Type, vtkShader*> shaders, vtkActor* act);
418 virtual void ReplaceShaderColor(
419 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
420 virtual void ReplaceShaderEdges(
421 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
422 virtual void ReplaceShaderLight(
423 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
425 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
427 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
429 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
431 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
432 virtual void ReplaceShaderClip(
433 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
435 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
437 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
438 virtual void ReplaceShaderDepth(
439 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
441
445 virtual void SetCustomUniforms(vtkOpenGLHelper& cellBO, vtkActor* actor);
446
451
456 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
457
462
467 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
468
472 virtual void UpdateBufferObjects(vtkRenderer* ren, vtkActor* act);
473
478
482 virtual void BuildBufferObjects(vtkRenderer* ren, vtkActor* act);
483
487 virtual void BuildIBO(vtkRenderer* ren, vtkActor* act, vtkPolyData* poly);
488
492 virtual void BuildSelectionIBO(
493 vtkPolyData* poly, std::vector<unsigned int> (&indices)[4], vtkIdType offset);
494
498 virtual void BuildSelectionCache(const char* arrayName, bool selectingPoints, vtkPolyData* poly);
499
500 // The VBO and its layout.
502
503 // Structures for the various cell types we render.
504 vtkOpenGLHelper Primitives[PrimitiveEnd];
505 vtkOpenGLHelper SelectionPrimitives[PrimitiveEnd];
508 bool DrawingSelection = false;
510 vtkMTimeType SelectionTime = 0;
511
512 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
515 bool SelectionCacheForPoints = false;
516 vtkMTimeType SelectionCacheTime = 0;
517 vtkPolyData* SelectionPolyData = nullptr;
518
519 // do we have wide lines that require special handling
521
522 // do we have textures that require special handling
523 virtual bool HaveTextures(vtkActor* actor);
524
525 // how many textures do we have
526 virtual unsigned int GetNumberOfTextures(vtkActor* actor);
527
528 // populate a vector with the textures we have
529 // the order is always
530 // ColorInternalTexture
531 // Actors texture
532 // Properties textures
533 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(vtkActor* actor);
534
535 // do we have textures coordinates that require special handling
536 virtual bool HaveTCoords(vtkPolyData* poly);
537
538 // values we use to determine if we need to rebuild shaders
539 // stored in a map keyed on the vtkOpenGLHelper, so one
540 // typically entry per type of primitive we render which
541 // matches the shader programs we use
543 {
544 public:
548
549 // Caches the vtkOpenGLRenderPass::RenderPasses() information.
550 // Note: Do not dereference the pointers held by this object. There is no
551 // guarantee that they are still valid!
553 };
554 std::map<const vtkOpenGLHelper*, primitiveInfo> PrimitiveInfo;
555
559
560 // Check the renderpasses in actor's property keys to see if they've changed
561 // render stages:
563
565 vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
566 vtkStateStorage VBOBuildState; // used for determining when to rebuild the VBO
567 vtkStateStorage IBOBuildState; // used for determining whento rebuild the IBOs
569 vtkStateStorage TempState; // can be used to avoid constant allocs/deallocs
571
574
579 int ShiftScaleMethod; // for points
581
582 // if set to true, tcoords will be passed to the
583 // VBO even if the mapper knows of no texture maps
584 // normally tcoords are only added to the VBO if the
585 // mapper has identified a texture map as well.
587
588 virtual void BuildCellTextures(
589 vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation);
590
591 void AppendCellTextures(vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation,
592 std::vector<unsigned char>& colors, std::vector<float>& normals, vtkPolyData* pd,
594
601
604 std::vector<unsigned char> EdgeValues;
606
607 // additional picking indirection
612
614 {
615 public:
620 };
621 std::map<std::string, ExtraAttributeValue> ExtraAttributes;
622
623 // Store shader properties on this class by legacy shader replacement functions
624 // This should disappear when the functions are deprecated
625 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
627 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
629
631
632 // are we currently drawing spheres/tubes
634 bool DrawingTubes(vtkOpenGLHelper& cellBO, vtkActor* actor);
636
637 // get which opengl mode to use to draw the primitive
638 int GetOpenGLMode(int representation, int primType);
639
640 // get how big to make the points when doing point picking
641 // typically 2 for points, 4 for lines, 6 for surface
643
644 // used to occasionally invoke timers
645 unsigned int TimerQueryCounter;
646
647 // stores the mapping from vtk cells to gl_PrimitiveId
649
650 // compute and set the maximum point and cell ID used in selection
652
653 void AddPointIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
654 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
655 void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
656 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
657
658 vtkNew<vtkCellArray> SelectionArrays[4];
659
660private:
662 void operator=(const vtkOpenGLPolyDataMapper&) = delete;
663};
664
665#endif
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
object to represent cell connectivity
Definition: vtkCellArray.h:290
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:63
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
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:143
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
abstract specification for renderers
Definition: vtkRenderer.h:173
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:175
record modification and/or execution time
Definition: vtkTimeStamp.h:52
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:164
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
@ 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