<div dir="ltr">HI Catalin,<div><br></div><div>I would recommend against deleting and recreating scene graphs on every frame, this will lead to poor performance.</div><div><br></div><div>If you have a really dynamic dataset then it may be appropriate to write a custom node for this, or use a shader.</div><div><br></div><div>In the case of shaders you can often replace billboards with a single geometry that get instanced and have the</div><div> vertex shader use the index id as a look up into a uniform array that contains the offsets, or any scales you want.</div><div>To change the positions you just update the uniform, to change number you just change the number of instances.</div><div><br></div><div>Robert.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 12 Feb 2020 at 20:31, OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I have an issue, might not be related to osg::Billboard it self.</div><div><br></div><div>At every frame, I delete all the drawables for a osg::Billboard: tags->removeDrawables(0, size);</div><div><br></div><div>and I add them again, possible with different values for position: tags->addDrawable(osg::Geometry, osg::Vec3(pos.x, pos.y, pos.z));</div><div><br></div><div>but in the view I still see the old positions of the tags!</div><div><br></div><div>Does OSG has some kind of cache? Do I have to invalidate something?</div><div><br></div><div>Greetings,</div><div>Catalin<br></div></div>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>