Skip to content
Snippets Groups Projects
Commit 3f597823 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'fix_wide_line_surface_edges_composite'


edd4bb12 fix an error when turnign on wide lines with surface_edges CPD

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1796
parents 504a46d0 edd4bb12
No related branches found
No related tags found
No related merge requests found
......@@ -50,17 +50,11 @@ public:
vtkTypeMacro(vtkCompositeMapperHelper, vtkOpenGLPolyDataMapper);
vtkGenericCompositePolyDataMapper2 *Parent;
int LastColorCoordinates;
int LastNormalsOffset;
int LastTCoordComponents;
protected:
vtkCompositeMapperHelper()
{
this->Parent = 0;
this->LastColorCoordinates = 0;
this->LastNormalsOffset = 0;
this->LastTCoordComponents = 0;
};
~vtkCompositeMapperHelper() VTK_OVERRIDE {};
......@@ -74,11 +68,6 @@ protected:
void SetLightingShaderParameters(
vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
// Description:
// Does the shader source need to be recomputed
bool GetNeedToRebuildShaders(
vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
// Description:
// Make sure an appropriate shader is defined, compiled and bound. This method
// orchistrates the process, much of the work is done in other methods
......@@ -173,32 +162,6 @@ void vtkCompositeMapperHelper::UpdateShaders(
this->Parent->SetShaderInitialized(cellBO.Program, true);
}
//-----------------------------------------------------------------------------
// smarter version that knows actor/property/camera/lights are not changing
bool vtkCompositeMapperHelper::GetNeedToRebuildShaders(
vtkOpenGLHelper &cellBO, vtkRenderer* ren, vtkActor *actor)
{
if (!cellBO.Program || !this->Parent->GetShaderInitialized(cellBO.Program))
{
bool result =
this->Superclass::GetNeedToRebuildShaders(cellBO, ren, actor);
this->LastColorCoordinates = this->VBO->ColorComponents;
this->LastNormalsOffset = this->VBO->NormalOffset;
this->LastTCoordComponents = this->VBO->TCoordComponents;
return result;
}
// after the first datasedt we only look for changes in pointdata
if (this->LastColorCoordinates != this->VBO->ColorComponents ||
this->LastNormalsOffset != this->VBO->NormalOffset ||
this->LastTCoordComponents != this->VBO->TCoordComponents)
{
return true;
}
return false;
}
//===================================================================
// Now the main class methods
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment