<div dir="ltr">Thanks. I need to make that test more conservative. I'll try making a topic soon to update it. Probably what it needs is <div><br></div><div>(actor->GetProperty() && actor->GetProperty()->GetMTime() > ...) ||</div><div>(actor->GetTexture() && actor->GetTexture()->GetMTime() > ...) ||</div><div><br></div><div>as opposed to the </div><div><br></div><div>actor->GetMTime() > ...</div><div><br></div><div>line<br><div><br></div><div>Thanks</div><div>Ken</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 9, 2016 at 6:20 PM, Milef, Nicholas Boris <span dir="ltr"><<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Thanks Ken. I was moving a few cone sources around (about 50) with SetPosition() and I see that they called Modified() which I'm guessing changes MTime? It was mostly for debugging
 because I can actually get around some of this in shaders to avoid going through the rendering pipeline. But, there are times when I need to move actors in real time, so this can sometimes be a bottleneck for me.
<div><br>
</div>
<div>Thanks,</div>
<div>Nick<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Ken Martin [<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>]<br>
<b>Sent:</b> Friday, September 09, 2016 5:58 PM<br>
<b>To:</b> Milef, Nicholas Boris<br>
<b>Cc:</b> <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
<b>Subject:</b> Re: [vtk-developers] Why is BuildShaders() continuously being called?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">When  GetNeedToRebuildShaders returns true. Which roughly is
<div><br>
</div>
<div>
<div>  if (cellBO.Program == 0 ||</div>
<div>      cellBO.ShaderSourceTime < this->GetMTime() ||</div>
<div>      cellBO.ShaderSourceTime < actor->GetMTime() ||</div>
<div>      cellBO.ShaderSourceTime < this->CurrentInput->GetMTime() ||</div>
<div>      cellBO.ShaderSourceTime < this->SelectionStateChanged ||</div>
<div>      cellBO.ShaderSourceTime < renderPassMTime ||</div>
<div>      cellBO.ShaderSourceTime < this->LightComplexityChanged[&<wbr>cellBO])</div>
<div>    {</div>
<div>    return true;</div>
<div>    }</div>
</div>
<div><br>
</div>
<div>So if the main points are if you are modifying the actor, mapper, or your data. If one of those is being modified every frame then let me know the use case and we can see if the current test is being too aggressive etc.</div>
<div><br>
</div>
<div>Thanks</div>
<div>Ken</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 9, 2016 at 5:47 PM, Milef, Nicholas Boris <span dir="ltr">
<<a href="http://redir.aspx?REF=ONPFOfU2bpzpsrcIgt2m7hhEWUJNJohZBPDsZ_BG4gPOQ7kY_tjTCAFtYWlsdG86bWlsZWZuQHJwaS5lZHU." target="_blank">milefn@rpi.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Under what conditions are shaders actually rebuilt? This seems to be the source of my performance issues and I need to know how to avoid this. The function I'm referring to is in
 vtkOpenGLPolyDataMapper(). It seems that they get rebuilt when an object gets modified, is this true?
<div><br>
</div>
<div>Thanks,</div>
<div>Nick</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://redir.aspx?REF=z0loocjZVeRvKP64EwrIgSUxd20gmnkUMWd_jmz3X9gvpbsY_tjTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29t" rel="noreferrer" target="_blank">
www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://redir.aspx?REF=xjL0ZBleD_hOp6gyTWCXZg3Oa88-8VbNha3cE3QD4LwvpbsY_tjTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29tL29wZW5zb3VyY2Uvb3BlbnNvdXJjZS5odG1s" rel="noreferrer" target="_blank">
http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://redir.aspx?REF=F1wcM-MWHo04vjS2vE_PfRsGFLOBuooAfHuTJGGv_fAvpbsY_tjTCAFodHRwOi8vbWFya21haWwub3JnL3NlYXJjaC8_cT12dGstZGV2ZWxvcGVycw.." rel="noreferrer" target="_blank">
http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://redir.aspx?REF=MhWBAevYNiqKNHblyp0YPuAiErwuqE4gdxAjUqqO-0YvpbsY_tjTCAFodHRwOi8vcHVibGljLmtpdHdhcmUuY29tL21haWxtYW4vbGlzdGluZm8vdnRrLWRldmVsb3BlcnM." rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtk-developers</a><br>
<br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Ken Martin PhD
<div>Chairman & CFO<br>
Kitware Inc.<br>
28 Corporate Drive<br>
Clifton Park NY 12065<br>
<a href="tel:518%20371%203971" value="+15183713971" target="_blank">518 371 3971</a>
<div><br>
</div>
<div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else
 is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the
 original message.  Thank you.</span></div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</div>