<div dir="ltr"><div>Hi Robert,</div><div><br></div><div> I fixed my issue by recreating the osg::Billboard, instead of re-adding all the drawables to the billboard.<br></div><div><br></div><div>1) tags = new osg::Billboard;</div><div><br></div><div>
// add all the billboards

</div><div>
2) tags->addDrawable(osg::Geometry, osg::Vec3(pos.x, pos.y, pos.z)); </div><div><br></div><div>3) draw scene</div><div><br></div><div>I understand very well what you are saying, but I don't have time to understand and create a custom node right now.<br>

</div><div>We are not using Shaders, the number of tags is very dynamic, however is less than 100.<br></div><div><br></div><div>Thank you very much,</div><div>Catalin<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 13 Feb 2020 at 10:04, 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">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" target="_blank">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>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com" target="_blank">osg-users+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org</a>.<br>
_______________________________________________<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>
<br>
-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users%2Bunsubscribe@googlegroups.com" target="_blank">osg-users+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org" rel="noreferrer" target="_blank">https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/CAO8T4jKTC1LoadUD9dOe1s8LgCO3X7i_FNarsoGraAzRRdqixA%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/CAO8T4jKTC1LoadUD9dOe1s8LgCO3X7i_FNarsoGraAzRRdqixA%40mail.gmail.com</a>.<br />