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=========================================================================*/
30#ifndef vtkOpenGLPolyDataMapper_h
31#define vtkOpenGLPolyDataMapper_h
32
33#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
34#include "vtkInformation.h" // for prim struct
35#include "vtkNew.h" // For vtkNew
36#include "vtkOpenGLHelper.h" // used for ivars
37#include "vtkPolyDataMapper.h"
38#include "vtkRenderingOpenGL2Module.h" // For export macro
39#include "vtkShader.h" // for methods
40#include "vtkStateStorage.h" // used for ivars
41
42#include <map> // for map
43#include <tuple> // for tuple
44#include <vector> // for vector
45
46class vtkCellArray;
48class vtkMatrix4x4;
49class vtkMatrix3x3;
56class vtkPoints;
57class vtkTexture;
59class vtkTransform;
61
62class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
63{
64public:
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
72 void RenderPiece(vtkRenderer* ren, vtkActor* act) override;
73
75
78 virtual void RenderPieceStart(vtkRenderer* ren, vtkActor* act);
79 virtual void RenderPieceDraw(vtkRenderer* ren, vtkActor* act);
80 virtual void RenderPieceFinish(vtkRenderer* ren, vtkActor* act);
82
89
90 vtkGetMacro(PopulateSelectionSettings, int);
91 void SetPopulateSelectionSettings(int v) { this->PopulateSelectionSettings = v; }
92
99 bool GetSupportsSelection() override { return true; }
100
101 // used by RenderPiece and functions it calls to reduce
102 // calls to get the input and allow for rendering of
103 // other polydata (not the input)
105
107
113 vtkSetStringMacro(PointIdArrayName);
114 vtkGetStringMacro(PointIdArrayName);
115 vtkSetStringMacro(CellIdArrayName);
116 vtkGetStringMacro(CellIdArrayName);
118
120
125 vtkSetStringMacro(ProcessIdArrayName);
126 vtkGetStringMacro(ProcessIdArrayName);
128
130
139 vtkSetStringMacro(CompositeIdArrayName);
140 vtkGetStringMacro(CompositeIdArrayName);
142
144
154 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::AddShaderReplacement")
155 void AddShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
156 const std::string& originalValue,
157 bool replaceFirst, // do this replacement before the default
158 const std::string& replacementValue, bool replaceAll);
159 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearShaderReplacement")
160 void ClearShaderReplacement(vtkShader::Type shaderType, // vertex, fragment, etc
161 const std::string& originalValue, bool replaceFirst);
162 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
163 void ClearAllShaderReplacements(vtkShader::Type shaderType);
164 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::ClearAllShaderReplacements")
165 void ClearAllShaderReplacements();
167
169
177 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetVertexShaderCode")
178 virtual void SetVertexShaderCode(const char* code);
179 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetVertexShaderCode")
180 virtual char* GetVertexShaderCode();
181 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetFragmentShaderCode")
182 virtual void SetFragmentShaderCode(const char* code);
183 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetFragmentShaderCode")
184 virtual char* GetFragmentShaderCode();
185 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::SetGeometryShaderCode")
186 virtual void SetGeometryShaderCode(const char* code);
187 VTK_DEPRECATED_IN_9_0_0("Use vtkOpenGLShaderProperty::GetGeometryShaderCode")
188 virtual char* GetGeometryShaderCode();
190
194 void ShallowCopy(vtkAbstractMapper* m) override;
195
197 vtkGetObjectMacro(VBOs, vtkOpenGLVertexBufferObjectGroup);
198
202 virtual void SetVBOShiftScaleMethod(int m);
203 virtual int GetVBOShiftScaleMethod() { return this->ShiftScaleMethod; }
204
219 virtual void SetPauseShiftScale(bool pauseShiftScale) { this->PauseShiftScale = pauseShiftScale; }
220 vtkGetMacro(PauseShiftScale, bool);
221 vtkBooleanMacro(PauseShiftScale, bool);
222
224 {
225 PrimitiveStart = 0,
226 PrimitivePoints = 0,
231 PrimitiveEnd
232 };
233
245 void MapDataArrayToVertexAttribute(const char* vertexAttributeName, const char* dataArrayName,
246 int fieldAssociation, int componentno = -1) override;
247
248 // This method will Map the specified data array for use as
249 // a texture coordinate for texture tname. The actual
250 // attribute will be named tname_coord so as to not
251 // conflict with the texture sampler definition which will
252 // be tname.
253 void MapDataArrayToMultiTextureAttribute(const char* tname, const char* dataArrayName,
254 int fieldAssociation, int componentno = -1) override;
255
259 void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
260
265
271 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
272
273protected:
276
278
279 void MapDataArray(const char* vertexAttributeName, const char* dataArrayName,
280 const char* texturename, int fieldAssociation, int componentno);
281
282 // what coordinate should be used for this texture
284
285 // handle updating shift scale based on pose changes
286 virtual void UpdateCameraShiftScale(vtkRenderer* ren, vtkActor* actor);
287
291 void GetCoincidentParameters(vtkRenderer* ren, vtkActor* actor, float& factor, float& offset);
292
298 void ComputeBounds() override;
299
304 virtual void UpdateShaders(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
305
310
314 virtual void BuildShaders(
315 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
316
320 virtual void GetShaderTemplate(
321 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
322
327 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
328
330
335 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act, bool prePass);
337 std::map<vtkShader::Type, vtkShader*> shaders, vtkActor* act);
338 virtual void ReplaceShaderColor(
339 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
340 virtual void ReplaceShaderEdges(
341 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
342 virtual void ReplaceShaderLight(
343 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
345 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
347 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
349 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
351 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
352 virtual void ReplaceShaderClip(
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 ReplaceShaderDepth(
359 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
361
365 virtual void SetCustomUniforms(vtkOpenGLHelper& cellBO, vtkActor* actor);
366
371
376 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
377
382
387 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act);
388
392 virtual void UpdateBufferObjects(vtkRenderer* ren, vtkActor* act);
393
398
402 virtual void BuildBufferObjects(vtkRenderer* ren, vtkActor* act);
403
407 virtual void BuildIBO(vtkRenderer* ren, vtkActor* act, vtkPolyData* poly);
408
412 virtual void BuildSelectionIBO(
413 vtkPolyData* poly, std::vector<unsigned int> (&indices)[4], vtkIdType offset);
414
418 virtual void BuildSelectionCache(const char* arrayName, bool selectingPoints, vtkPolyData* poly);
419
420 // The VBO and its layout.
422
423 // Structures for the various cell types we render.
424 vtkOpenGLHelper Primitives[PrimitiveEnd];
425 vtkOpenGLHelper SelectionPrimitives[PrimitiveEnd];
428 bool DrawingSelection = false;
430 vtkMTimeType SelectionTime = 0;
431
432 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
435 bool SelectionCacheForPoints = false;
436 vtkMTimeType SelectionCacheTime = 0;
437 vtkPolyData* SelectionPolyData = nullptr;
438
439 // do we have wide lines that require special handling
441
442 // do we have textures that require special handling
443 virtual bool HaveTextures(vtkActor* actor);
444
445 // how many textures do we have
446 virtual unsigned int GetNumberOfTextures(vtkActor* actor);
447
448 // populate a vector with the textures we have
449 // the order is always
450 // ColorInternalTexture
451 // Actors texture
452 // Properties textures
453 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(vtkActor* actor);
454
455 // do we have textures coordinates that require special handling
456 virtual bool HaveTCoords(vtkPolyData* poly);
457
458 // values we use to determine if we need to rebuild shaders
459 // stored in a map keyed on the vtkOpenGLHelper, so one
460 // typically entry per type of primitive we render which
461 // matches the shader programs we use
463 {
464 public:
468
469 // Caches the vtkOpenGLRenderPass::RenderPasses() information.
470 // Note: Do not dereference the pointers held by this object. There is no
471 // guarantee that they are still valid!
473 };
474 std::map<const vtkOpenGLHelper*, primitiveInfo> PrimitiveInfo;
475
479
480 // Check the renderpasses in actor's property keys to see if they've changed
481 // render stages:
483
485 vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
486 vtkStateStorage VBOBuildState; // used for determining when to rebuild the VBO
487 vtkStateStorage IBOBuildState; // used for determining whento rebuild the IBOs
489 vtkStateStorage TempState; // can be used to avoid constant allocs/deallocs
491
494
499 int ShiftScaleMethod; // for points
501
502 // if set to true, tcoords will be passed to the
503 // VBO even if the mapper knows of no texture maps
504 // normally tcoords are only added to the VBO if the
505 // mapper has identified a texture map as well.
507
508 virtual void BuildCellTextures(
509 vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation);
510
511 void AppendCellTextures(vtkRenderer* ren, vtkActor*, vtkCellArray* prims[4], int representation,
512 std::vector<unsigned char>& colors, std::vector<float>& normals, vtkPolyData* pd,
514
521
524 std::vector<unsigned char> EdgeValues;
526
527 // additional picking indirection
532
534 {
535 public:
540 };
541 std::map<std::string, ExtraAttributeValue> ExtraAttributes;
542
543 // Store shader properties on this class by legacy shader replacement functions
544 // This should disappear when the functions are deprecated
545 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
547 // VTK_DEPRECATED_IN_9_0_0("legacy support functions")
549
551
552 // are we currently drawing spheres/tubes
554 bool DrawingTubes(vtkOpenGLHelper& cellBO, vtkActor* actor);
556
557 // get which opengl mode to use to draw the primitive
558 int GetOpenGLMode(int representation, int primType);
559
560 // get how big to make the points when doing point picking
561 // typically 2 for points, 4 for lines, 6 for surface
563
564 // used to occasionally invoke timers
565 unsigned int TimerQueryCounter;
566
567 // stores the mapping from vtk cells to gl_PrimitiveId
569
570 // compute and set the maximum point and cell ID used in selection
572
573 void AddPointIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
574 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
575 void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
576 unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId);
577
578 vtkNew<vtkCellArray> SelectionArrays[4];
579
580private:
582 void operator=(const vtkOpenGLPolyDataMapper&) = delete;
583};
584
585#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
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:57
abstract specification for renderers
Definition: vtkRenderer.h:73
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:47
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:45
@ 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