HI Catalin,

I would recommend against deleting and recreating scene graphs on every
frame, this will lead to poor performance.

If you have a really dynamic dataset then it may be appropriate to write a
custom node for this, or use a shader.

In the case of shaders you can often replace billboards with a single
geometry that get instanced and have the
 vertex shader use the index id as a look up into a uniform array that
contains the offsets, or any scales you want.
To change the positions you just update the uniform, to change number you
just change the number of instances.

Robert.

On Wed, 12 Feb 2020 at 20:31, OpenSceneGraph Users <
osg-users@lists.openscenegraph.org> wrote:

> Hi,
>
> I have an issue, might not be related to osg::Billboard it self.
>
> At every frame, I delete all the drawables for a osg::Billboard:
> tags->removeDrawables(0, size);
>
> and I add them again, possible with different values for position:
> tags->addDrawable(osg::Geometry, osg::Vec3(pos.x, pos.y, pos.z));
>
> but in the view I still see the old positions of the tags!
>
> Does OSG has some kind of cache? Do I have to invalidate something?
>
> Greetings,
> Catalin
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/mailman.70438.1581581043.7167.osg-users-openscenegraph.org%40lists.openscenegraph.org.

Reply via email to