Are display lists active in your scene? if so, maybe a dirtyDisplayList()
call might be required
on the affected drawables.

drawable->dirtyDisplayList()

As far as I know display lists are still the default in OSG, unless you
explicitly disable them on
geometry objects (and possibly enable vertex buffer objects instead, for
performance reasons)

the corresponding API calls on drawables would be

drawable->setUseDisplayList( false )
drawable->setUseVertexBufferObjects( true )

you could use a visitor right after loading the scene to switch off display
lists and enabling
vertex buffer objects instead.

Christian


2018-01-09 14:58 GMT+01:00 Werner Modenbach <werner.modenb...@texion.eu>:

> Hi all,
>
> I'm loading 3ds scenes as subnodes into my scene. The 3ds coordinates are
> in a different scale than my scene.
> Usually I would solve this by a transform. But because of internal reasons
> I need the vertices being
> in MY coordinate measure.
> So I wrote a scaling visitor, that multiplies al vertices of geometries by
> a given factor.
> That works perfectly fine when loading the 3ds scene:
> *        osg::ref_ptr<osg::Node**>* *node* *=* *osgDB**::readRefNodeFile(*
> *path**); *
> *        ScaleVisitor* *sv(**initialObjectScale* ***
> *correctiveObjectScale**); *
>         *node->**accept**(sv); *
>         *addChild**(node); *
>
> Unfortunately when rescaling the object after being added as a child this
> doesn't work any more:
> *        osg::ref_ptr<osg::Node> node* *=* *getChild(0);*
> *        ScaleVisitor* *sv(scaleChange);*
>         *node->accept(sv);*
>
> The 3ds scene doesn't change size on my screen.
> The visitor calls:
>         vertices->dirty();
>         geom.dirtyBound();
>
> But nothing happens. What am I missing? Deleting the 3ds scene and
> recreating it from scratch works OK but is very inefficient.
>
> Thanks for any hint.
>
> - Werner -
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to