------------------------------------------------------------------------------
| 3768 | |
| 3769 | //------------------------------------------------------------------------------ |
| 3770 | bool vtkOpenGLPolyDataMapper::GetNeedToRebuildBufferObjects( |
| 3771 | vtkRenderer* vtkNotUsed(ren), vtkActor* act) |
| 3772 | { |
| 3773 | // we use a state vector instead of just mtime because |
| 3774 | // we do not want to check the actor's mtime. Actor |
| 3775 | // changes mtime every time it's position changes. But |
| 3776 | // changing an actor's position does not require us to |
| 3777 | // rebuild all the VBO/IBOs. So we only watch the mtime |
| 3778 | // of the property/texture. But if someone changes the |
| 3779 | // Property on an actor the mtime may actually go down |
| 3780 | // because the new property has an older mtime. So |
| 3781 | // we watch the actual mtime, to see if it changes as |
| 3782 | // opposed to just checking if it is greater. |
| 3783 | this->TempState.Clear(); |
| 3784 | this->TempState.Append(act->GetProperty()->GetMTime(), "actor mtime"); |
| 3785 | this->TempState.Append(this->CurrentInput ? this->CurrentInput->GetMTime() : 0, "input mtime"); |
| 3786 | this->TempState.Append(act->GetTexture() ? act->GetTexture()->GetMTime() : 0, "texture mtime"); |
| 3787 | |
| 3788 | if (this->VBOBuildState != this->TempState || this->VBOBuildTime < this->GetMTime()) |
| 3789 | { |
| 3790 | this->VBOBuildState = this->TempState; |
| 3791 | return true; |
| 3792 | } |
| 3793 | |
| 3794 | return false; |
| 3795 | } |
| 3796 | |
| 3797 | //------------------------------------------------------------------------------ |
| 3798 | // create the cell scalar array adjusted for ogl Cells |
no test coverage detected