<div dir="ltr"><div>Hi Stuart,</div><div><br></div><div>The new ShapeDrawable is written completely differently, and is now subclassed from osg::Geometry and has ShapeDrawable::build() function that computes all the appropriate vertex arrays etc,  So try just calling shapedrawabl->build() when you update the shape.</div><div><br></div><div>I should however suggest that perhaps ShapeDrawable isn't the tool for the job for this type of interactive updating, it's written as a create once, use many times features.  If you are updating the height interactively then it may be best to just use a shader to set the height within the vertex shader.  For instance if you had a 1000 cyclinders that all had independently varying heights then I'd write this as an instanced geometry with a uniform arrays or 1D texture that stores the position and sizes then have the vertex shader positing and scale the geometry accordingly.  This way you'd just update the uniform/1D texture in a super lightweigth way and everything would just render smoothly and efficiently.<br></div><div><br></div><div>Cheers,<br></div><div>Robert.<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 26 Nov 2018 at 21:55, Stuart Mentzer <<a href="mailto:osgforum@tevs.eu">osgforum@tevs.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have an osg::Cylinder in an osg::ShapeDrawable and I change its height in an UpdateCallback like this:<br>
<br>
Code:<br>
cylinder->setHeight( h );<br>
drawable->dirtyDisplayList();<br>
drawable->dirtyBound();<br>
<br>
<br>
<br>
<br>
This works in OSG 3.4.1 but with OSG 3.6.3 (at least on my Windows builds) the height change doesn't show up. Checking the value with getHeight shows that the cylinder height is updated so maybe the issue is that dirtyDisplayList is no longer sufficient to trigger the display update.<br>
<br>
I can try to put together a small self-contained example if this doesn't give anyone a clue what is going on.<br>
<br>
Any help will be much appreciated. And if this has exposed an OSG bug it would be good to fix for 3.6.4.<br>
<br>
Thanks!<br>
<br>
Cheers,<br>
Stuart<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=75246#75246" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75246#75246</a><br>
<br>
<br>
<br>
<br>
<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>
</blockquote></div>