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=========================================================================*/
116#ifndef vtkOpenGLPolyDataMapper_h
117#define vtkOpenGLPolyDataMapper_h
118
119#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
120#include "vtkInformation.h" // for prim struct
121#include "vtkNew.h" // For vtkNew
122#include "vtkOpenGLHelper.h" // used for ivars
123#include "vtkPolyDataMapper.h"
124#include "vtkRenderingOpenGL2Module.h" // For export macro
125#include "vtkShader.h" // for methods
126#include "vtkStateStorage.h" // used for ivars
127
128#include <map> // for map
129#include <tuple> // for tuple
130#include <vector> // for vector
131
132class vtkCellArray;
134class vtkMatrix4x4;
135class vtkMatrix3x3;
138class vtkOpenGLTexture;
142class vtkPoints;
143class vtkTexture;
144class vtkTextureObject;
145class vtkTransform;
147
148class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
149{
150public:
153 void PrintSelf(ostream& os, vtkIndent indent) override;
154
158 void RenderPiece(vtkRenderer* ren, vtkActor* act) override;
159
161
164 virtual void RenderPieceStart(vtkRenderer* ren, vtkActor* act);
165 virtual void RenderPieceDraw(vtkRenderer* ren, vtkActor* act);
166 virtual void RenderPieceFinish(vtkRenderer* ren, vtkActor* act);
168
175
176 vtkGetMacro(PopulateSelectionSettings, int);
177 void SetPopulateSelectionSettings(int v) { this->PopulateSelectionSettings = v; }
178
185 bool GetSupportsSelection() override { return true; }
186
187 // used by RenderPiece and functions it calls to reduce
188 // calls to get the input and allow for rendering of
189 // other polydata (not the input)
191
193
199 vtkSetStringMacro(PointIdArrayName);
200 vtkGetStringMacro(PointIdArrayName);
201 vtkSetStringMacro(CellIdArrayName);
202 vtkGetStringMacro(CellIdArrayName);
204
206
211 vtkSetStringMacro(ProcessIdArrayName);
212 vtkGetStringMacro(ProcessIdArrayName);
214
216
225 vtkSetStringMacro(CompositeIdArrayName);
226 vtkGetStringMacro(CompositeIdArrayName);
228
230
240 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::AddShaderReplacement")
241 void AddShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
242 const std::string& originalValue,
243 bool replaceFirst, // do this replacement before the default
244 const std::string& replacementValue, bool replaceAll);
245 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearShaderReplacement")
246 void ClearShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
247 const std::string& originalValue, bool replaceFirst);
248 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
249 void ClearAllShaderReplacements(vtkShader::Type shaderType);
250 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
251 void ClearAllShaderReplacements();
253
255
263 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetVertexShaderCode")
264 virtual void SetVertexShaderCode(const char* code);
265 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetVertexShaderCode")
266 virtual char* GetVertexShaderCode();
267 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetFragmentShaderCode")
268 virtual void SetFragmentShaderCode(const char* code);
269 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetFragmentShaderCode")
270 virtual char* GetFragmentShaderCode();
271 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetGeometryShaderCode")
272 virtual void SetGeometryShaderCode(const char* code);
273 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetGeometryShaderCode")
274 virtual char* GetGeometryShaderCode();
276
280 void ShallowCopy(vtkAbstractMapper* m) override;
281
283 vtkGetObjectMacro(VBOs, vtkOpenGLVertexBufferObjectGroup);
284
288 virtual void SetVBOShiftScaleMethod(int m);
289 virtual int GetVBOShiftScaleMethod() { return this->ShiftScaleMethod; }
290
305 virtual void SetPauseShiftScale(bool pauseShiftScale) { this->PauseShiftScale = pauseShiftScale; }
306 vtkGetMacro(PauseShiftScale, bool);
307 vtkBooleanMacro(PauseShiftScale, bool);
308
310 {
311 PrimitiveStart = 0,
312 PrimitivePoints = 0,
317 PrimitiveEnd
318 };
319
331 void MapDataArrayToVertexAttribute(const char* vertexAttributeName, const char* dataArrayName,
332 int fieldAssociation, int componentno = -1) override;
333
334 // This method will Map the specified data array for use as
335 // a texture coordinate for texture tname. The actual
336 // attribute will be named tname_coord so as to not
337 // conflict with the texture sampler definition which will
338 // be tname.
339 void MapDataArrayToMultiTextureAttribute(const char* tname, const char* dataArrayName,
340 int fieldAssociation, int componentno = -1) override;
341
345 void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
346
351
357 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
358
359protected:
362
364
365 void MapDataArray(const char* vertexAttributeName, const char* dataArrayName,
366 const char* texturename, int fieldAssociation, int componentno);
367
368 // what coordinate should be used for this texture
369 std::string GetTextureCoordinateName(const char* tname);
370
371 // handle updating shift scale based on pose changes
372 virtual void UpdateCameraShiftScale(vtkRenderer* ren, vtkActor* actor);
373
377 void GetCoincidentParameters(vtkRenderer* ren, vtkActor* actor, float& factor, float& offset);
378
384 void ComputeBounds() override;
385
390 virtual void UpdateShaders(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
391
396
400 virtual void BuildShaders(
401 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
402
406 virtual void GetShaderTemplate(
407 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
408
413 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
414
416
421 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act, bool prePass);
423 std::map<vtkShader::Type, vtkShader*> shaders, vtkActor* act);
424 virtual void ReplaceShaderColor(
425 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
426 virtual void ReplaceShaderEdges(
427 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
428 virtual void ReplaceShaderLight(
429 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
431 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
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 ReplaceShaderClip(
439 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
441 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
443 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
444 virtual void ReplaceShaderDepth(
445 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
447
451 virtual void SetCustomUniforms(vtkOpenGLHelper& cellBO, vtkActor* actor);
452
457
462 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
463
468
473 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
474
478 virtual void UpdateBufferObjects(vtkRenderer* ren, vtkActor* act);
479
484
488 virtual void BuildBufferObjects(vtkRenderer* ren, vtkActor* act);
489
493 virtual void BuildIBO(vtkRenderer* ren, vtkActor* act, vtkPolyData* poly);
494
498 virtual void BuildSelectionIBO(
499 vtkPolyData* poly, std::vector<unsigned int> (&indices)[4], vtkIdType offset);
500
504 virtual void BuildSelectionCache(const char* arrayName, bool selectingPoints, vtkPolyData* poly);
505
506 // The VBO and its layout.
508
509 // Structures for the various cell types we render.
510 vtkOpenGLHelper Primitives[PrimitiveEnd];
511 vtkOpenGLHelper SelectionPrimitives[PrimitiveEnd];
514 bool DrawingSelection = false;
516 vtkMTimeType SelectionTime = 0;
517
518 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
521 bool SelectionCacheForPoints = false;
522 vtkMTimeType SelectionCacheTime = 0;
523 vtkPolyData* SelectionPolyData = nullptr;
524
525 // do we have wide lines that require special handling
527
528 // do we have textures that require special handling
529 virtual bool HaveTextures(vtkActor* actor);
530
531 // how many textures do we have
532 virtual unsigned int GetNumberOfTextures(vtkActor* actor);
533
534 // populate a vector with the textures we have
535 // the order is always
536 // ColorInternalTexture
537 // Actors texture
538 // Properties textures
539 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(vtkActor* actor);
540
541 // do we have textures coordinates that require special handling
542 virtual bool HaveTCoords(vtkPolyData* poly);
543
544 // values we use to determine if we need to rebuild shaders
545 // stored in a map keyed on the vtkOpenGLHelper, so one
546 // typically entry per type of primitive we render which
547 // matches the shader programs we use
549 {
550 public:
554
555 // Caches the vtkOpenGLRenderPass::RenderPasses() information.
556 // Note: Do not dereference the pointers held by this object. There is no
557 // guarantee that they are still valid!
559 };
560 std::map<const vtkOpenGLHelper*, primitiveInfo> PrimitiveInfo;
561
565
566 // Check the renderpasses in actor's property keys to see if they've changed
567 // render stages:
569
571 vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
572 vtkStateStorage VBOBuildState; // used for determining when to rebuild the VBO
573 vtkStateStorage IBOBuildState; // used for determining whento rebuild the IBOs
575 vtkStateStorage TempState; // can be used to avoid constant allocs/deallocs
577
580
585 int ShiftScaleMethod; // for points
587
588 // if set to true, tcoords will be passed to the
589 // VBO even if the mapper knows of no texture maps
590 // normally tcoords are only added to the VBO if the
591 // mapper has identified a texture map as well.
593
594 virtual void BuildCellTextures(
595 vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation);
596
597 void AppendCellTextures(vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation,
598 std::vector<unsigned char>& colors, std::vector<float>& normals, vtkPolyData* pd,
600
607
610 std::vector<unsigned char> EdgeValues;
612
613 // additional picking indirection
618
620 {
621 public:
622 std::string DataArrayName;
625 std::string TextureName;
626 };
627 std::map<std::string, ExtraAttributeValue> ExtraAttributes;
628
629 // Store shader properties on this class by legacy shader replacement functions
630 // This should disappear when the functions are deprecated
631 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
633 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
635
637
638 // are we currently drawing spheres/tubes
640 bool DrawingTubes(vtkOpenGLHelper& cellBO, vtkActor* actor);
642
643 // get which opengl mode to use to draw the primitive
644 int GetOpenGLMode(int representation, int primType);
645
646 // get how big to make the points when doing point picking
647 // typically 2 for points, 4 for lines, 6 for surface
649
650 // used to occasionally invoke timers
651 unsigned int TimerQueryCounter;
652
653 // stores the mapping from vtk cells to gl_PrimitiveId
655
656 // compute and set the maximum point and cell ID used in selection
658
659 void AddPointIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
660 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
661 void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
662 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
663
664 vtkNew<vtkCellArray> SelectionArrays[4];
665
666private:
668 void operator=(const vtkOpenGLPolyDataMapper&) = delete;
669};
670
671#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
Allocate and hold a VTK object.
Definition: vtkNew.h:165
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:76
abstract specification for renderers
Definition: vtkRenderer.h:182
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:38
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: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:39
#define VTK_DEPRECATED_IN_9_0_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287