<div dir="ltr"><div><div><br></div>I just checked a recent osg::Drawable header file and it seems dirtyDisplayList() is deprecated<br></div>and has been replaced with dirtyGLObjects(). Relevant snippet follows:<br><div><div><br>#<span class="gmail-pl-k">ifdef</span> OSG_USE_DEPRECATED_API
<table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC239" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">/*</span>* Deprecated, use dirtyGLObjects() instead. <span class="gmail-pl-c">*/</span></span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC240" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">inline</span> <span class="gmail-pl-k">void</span> <span class="gmail-pl-en">dirtyDisplayList</span>()</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC241" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC242" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c1">dirtyGLObjects</span>();</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC243" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> }</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC244" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">#<span class="gmail-pl-k">endif</span></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC245" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC246" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-c"><span class="gmail-pl-c">/*</span>* Force a recompile on next draw() of any OpenGL objects associated with this geoset.<span class="gmail-pl-c">*/</span></span></td>
</tr>
<tr>
</tr></tbody></table> <span class="gmail-pl-k">virtual</span> <span class="gmail-pl-k">void</span> <span class="gmail-pl-en">dirtyGLObjects</span>();<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-09 17:57 GMT+01:00 Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><br>Are display lists active in your scene? if so, maybe a dirtyDisplayList() call might be required</div><div>on the affected drawables.<br></div><br></div><div>drawable->dirtyDisplayList()<br><div><br></div>As far as I know display lists are still the default in OSG, unless you explicitly disable them on<br></div>geometry objects (and possibly enable vertex buffer objects instead, for performance reasons)<br><br></div>the corresponding API calls on drawables would be<div><div><div><br></div><div>drawable->setUseDisplayList( false )<br></div><div><span class="m_1875639943094064220gmail-st">drawable-><wbr>setUseVertexBufferObjects( true )</span></div><div><br></div><div>you could use a visitor right after loading the scene to switch off display lists and enabling</div><div>vertex buffer objects instead.</div><div><br></div><div>Christian</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2018-01-09 14:58 GMT+01:00 Werner Modenbach <span dir="ltr"><<a href="mailto:Werner.Modenbach@texion.eu" target="_blank">Werner.Modenbach@texion.eu</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I'm loading 3ds scenes as subnodes into my scene. The 3ds
coordinates are in a different scale than my scene.<br>
Usually I would solve this by a transform. But because of internal
reasons I need the vertices being <br>
in MY coordinate measure.<br>
So I wrote a scaling visitor, that multiplies al vertices of
geometries by a given factor.<br>
That works perfectly fine when loading the 3ds scene:<br>
<span style="color:#c0c0c0"> </span><i>
osg::ref_ptr<osg::Node</i><i>></i><i> </i><i>node</i><i> </i><i>=</i><i>
</i><i>osgDB</i><i>::readRefNodeFile(</i><i>path</i><i>);
</i><i><br>
</i><i> </i><i> ScaleVisitor</i><i> </i><i>sv(</i><i>initialObjectScale</i><i>
</i><i>*</i><i> </i><i>correctiveObjectScale</i><i>);
</i><i><br>
</i><i> </i><i>node-></i><i>accept</i><i>(sv);
</i><i><br>
</i><i> </i><i>addChild</i><i>(node);
</i><i><br>
</i><br>
Unfortunately when rescaling the object after being added as a child
this doesn't work any more:<br>
<i> osg::ref_ptr<osg::Node> node</i><i> </i><i>=</i><i>
</i><i>getChild(0);</i><i>
</i><i><br>
</i><i> ScaleVisitor</i><i> </i><i>sv(scaleChange);</i><i>
<br>
</i><i>node->accept(sv);</i>
<br>
<br>
The 3ds scene doesn't change size on my screen.<br>
The visitor calls:<br>
<span style="color:#c0c0c0"> </span> vertices->dirty();
<br>
<span style="color:#c0c0c0"> </span> geom.dirtyBound();<br>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
But nothing happens. What am I missing? Deleting the 3ds scene and
recreating it from scratch works OK but is very inefficient.<br>
<br>
Thanks for any hint.<span class="m_1875639943094064220HOEnZb"><font color="#888888"><br>
<br>
- Werner -<br>
</font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>