Commit e43c78fa authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'fix_cell_color_issue'

6c3bfde6 try something for bigmac issue
79a8a4b0

 fix an issue where the cell textures were not updating
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Berk Geveci's avatarBerk Geveci <berk.geveci@kitware.com>
Merge-request: !1879
parents 01e24f10 6c3bfde6
......@@ -3091,11 +3091,21 @@ void vtkOpenGLPolyDataMapper::BuildBufferObjects(vtkRenderer *ren, vtkActor *act
// only rebuild what we need to
// if the data or mapper or selection state changed
// then rebuild the cell arrays
if (this->VBOBuildTime < this->GetMTime() ||
this->VBOBuildTime < this->CurrentInput->GetMTime() ||
this->VBOBuildTime < this->SelectionStateChanged)
std::ostringstream toString;
toString.str("");
toString.clear();
toString << (prims[0]->GetNumberOfCells() ? prims[0]->GetMTime() : 0) <<
'A' << (prims[1]->GetNumberOfCells() ? prims[1]->GetMTime() : 0) <<
'B' << (prims[2]->GetNumberOfCells() ? prims[2]->GetMTime() : 0) <<
'C' << (prims[3]->GetNumberOfCells() ? prims[3]->GetMTime() : 0) <<
'D' << representation <<
'E' << this->LastSelectionState <<
'F' << poly->GetMTime() <<
'G' << this->GetMTime();
if (this->CellTextureBuildString != toString.str())
{
this->BuildCellTextures(ren, act, prims, representation);
this->CellTextureBuildString = toString.str();
}
// on apple with the AMD PrimID bug we use a slow
......@@ -3160,7 +3170,6 @@ void vtkOpenGLPolyDataMapper::BuildBufferObjects(vtkRenderer *ren, vtkActor *act
// the input data is clearly one as it can change all four items tcoords may
// haveTextures or not colors may change based on quite a few mapping
// parameters in the mapper
std::ostringstream toString;
toString.str("");
toString.clear();
toString << poly->GetMTime() <<
......
......@@ -354,6 +354,7 @@ protected:
vtkTimeStamp VBOBuildTime; // When was the OpenGL VBO updated?
std::string VBOBuildString; // used for determining whento rebuild the VBO
std::string IBOBuildString; // used for determining whento rebuild the IBOs
std::string CellTextureBuildString;
vtkOpenGLTexture* InternalColorTexture;
int PopulateSelectionSettings;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment