MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateGLSLMods

Method UpdateGLSLMods

Rendering/OpenGL2/vtkOpenGLLowMemoryPolyDataMapper.cxx:3076–3094  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3074
3075//------------------------------------------------------------------------------
3076void vtkOpenGLLowMemoryPolyDataMapper::UpdateGLSLMods(vtkRenderer*, vtkActor*)
3077{
3078 auto modsIter = vtk::TakeSmartPointer(this->GLSLMods->NewIterator());
3079 for (modsIter->InitTraversal(); !modsIter->IsDoneWithTraversal(); modsIter->GoToNextItem())
3080 {
3081 if (auto cameraMod = vtkGLSLModCamera::SafeDownCast(modsIter->GetCurrentObject()))
3082 {
3083 // camera mod needs additional information before they can set shader parameters.
3084 if (this->CoordinateShiftAndScaleInUse)
3085 {
3086 cameraMod->EnableShiftScale(this->CoordinateShiftAndScaleInUse, this->SSMatrix);
3087 }
3088 else
3089 {
3090 cameraMod->DisableShiftScale();
3091 }
3092 }
3093 }
3094}
3095
3096//------------------------------------------------------------------------------
3097void vtkOpenGLLowMemoryPolyDataMapper::MapDataArrayToVertexAttribute(

Callers 1

RenderPieceStartMethod · 0.95

Calls 7

GetCurrentObjectMethod · 0.80
EnableShiftScaleMethod · 0.80
DisableShiftScaleMethod · 0.80
NewIteratorMethod · 0.45
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45

Tested by

no test coverage detected