[vtk-developers] Why is BuildShaders() continuously being called?

Ken Martin ken.martin at kitware.com
Fri Sep 9 17:58:03 EDT 2016


When  GetNeedToRebuildShaders returns true. Which roughly is

  if (cellBO.Program == 0 ||
      cellBO.ShaderSourceTime < this->GetMTime() ||
      cellBO.ShaderSourceTime < actor->GetMTime() ||
      cellBO.ShaderSourceTime < this->CurrentInput->GetMTime() ||
      cellBO.ShaderSourceTime < this->SelectionStateChanged ||
      cellBO.ShaderSourceTime < renderPassMTime ||
      cellBO.ShaderSourceTime < this->LightComplexityChanged[&cellBO])
    {
    return true;
    }

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.

Thanks
Ken




On Fri, Sep 9, 2016 at 5:47 PM, Milef, Nicholas Boris <milefn at rpi.edu>
wrote:

> 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?
>
> Thanks,
> Nick
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160909/1ff58a0f/attachment.html>


More information about the vtk-developers mailing list