[vtkusers] Polydata filtering in real-time
Nil Goyette
nil.goyette at imeka.ca
Wed Jun 4 17:04:14 EDT 2014
Hi Cory,
Thanks for the answer. I wasn't aware that ImmediateModeRendering did
exactly that. (Btw, it's On, not Off). I tried what you suggested and it
does make the application faster, but not as fast as what I had before.
If I don't modify the mapper, I must create another vtkPolyData each
time I move my cube, then the standard mapper renders it. This gets me
near 10fps.
In my version, I modified the mapper to receive a set<vtkIdType>* (the
cells passing in the box) and a polydata* (all the fibers), so it
renders only the required cells. (it doesn't even render its input
object... it's a hack, I know). With this, there's no useless
points/cells copy. If there's a cleaner way to do it, I'm all ears :)
Le 2014-06-04 14:55, Cory Quammen a écrit :
> Hi Nil,
>
> You shouldn't actually need to modify the code. You should just be
> able to turn off use of OpenGL display lists with
> vtkMapper::ImmediateModeRenderingOff().
>
> http://www.vtk.org/doc/nightly/html/classvtkMapper.html#ab9db044b3f5113808d2de42f13bb4fe8
>
> Let us know if that gives you the same near-real-time updates that
> removing calls to glNewList does.
>
> Thanks,
> Cory
>
--
Logo Imeka <http://imeka.ca/> Nil Goyette, M.Sc.
Programmer
www.imeka.ca <http://imeka.ca/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140604/61494488/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Imeka.png
Type: image/png
Size: 6630 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140604/61494488/attachment.png>
More information about the vtkusers
mailing list