Fausto,

My project uses Qt widgets as well, so if this is the problem, I'd be
interested in the solution so that I can proof read our code.
Fortunately/unfortunately, it appears to work for me.

As to the nodes and drawables, all I can say is that there are nodes,
and then, there are nodes.

In any event, happy hunting...

D.J.

On Thu, Jan 21, 2010 at 1:14 PM, fausto <[email protected]> wrote:
> Thank you both for your inputs.
> To Robert:
>>Try writing the subgraph they are in out to a file then load this file
>> into osgviewer to see if can view them.
>
> Yes, as I mentioned the new scene data is OK, I can see it while debugging
> and after saving->loading it with osgViewer.exe all new drawables appear in
> the scene, and previous ones are removed. So, the scene is OK, the problem
> is really with the original viewer. It renders OK, but doesn't update
> properly when drawables are added.
> I'm rendering in Qt widgets, could that be the problem?
> To D.J.
>
>> I might recommend refactoring the code to
>> add/remove nodes instead of drawables.
> Unfortunately, I need nodes to be the same.
> I keep searching and testing.
>
> Thanks again for your help.
> Cheers.
> Fausto
>
> On Thu, Jan 21, 2010 at 6:42 PM, D.J. Caldwell <[email protected]>
> wrote:
>>
>> Hi Fausto and Robert,
>>
>> If the simple modification is due to some specific user event (button
>> press, file dialog, etc.), I might recommend refactoring the code to
>> add/remove nodes instead of drawables.  It sounds like you have no
>> trouble initially getting the geometry into the scene; it is the
>> simple modification that is the problem.
>>
>> What I am suggesting here is a work-around, and not a fix (on my
>> system, it appears that there is no "bug" to fix).  Other than this, I
>> believe the issue may be familiarity with the available patterns; that
>> is, using the right tool for the right job.  No insult intended, but
>> the only fix for that is research, time, and patience.
>>
>> The project I am part of uses visitors and/or swapping out vertices
>> for time based changes, and adding/removing nodes for user based
>> inputs.
>>
>> Fausto, as Robert said, you are the only one who can know what is
>> appropriate for your project.
>>
>> Just some things to consider; I hope this helps...
>>
>> D.J.
>>
>> On Thu, Jan 21, 2010 at 12:12 PM, Robert Osfield
>> <[email protected]> wrote:
>> > Hi Fausto,
>> >
>> > Dynamically modifying the scene graph shouldn't be that hard.
>> > Removing drawables and adding news ones should perfect safe and
>> > shouldn't require and extra steps from you, no need to dirty bounding
>> > volumes or display lists, it should all just work.
>> >
>> > As to why your new drawables aren't appearing I can't say.  Try
>> > writing the subgraph they are in out to a file then load this file
>> > into osgviewer to see if can view them.  It could be simply that there
>> > is something wrong with the geometry data you've set up.  Only you has
>> > your app and your data so you're the only one that can investigate.
>> >
>> > Robert.
>> >
>> > On Thu, Jan 21, 2010 at 4:41 PM, fausto <[email protected]> wrote:
>> >> Hi All,
>> >> I'm struggling to have a simple modification of an osg scene working.
>> >> I simply need to remove all drawables from a geode and add new
>> >> drawables to
>> >> the same geode.
>> >>
>> >> In the viewer, the geode just disappears after removing the drawables,
>> >> but I
>> >> can see that the scene contains the geode with the new drawables. So,
>> >> it
>> >> seems a rendering problem.
>> >>
>> >> I see that many people have similar problems with dynamic
>> >> modifications.
>> >> I've read plenty of posts about setting display list to false, using
>> >> callbacks, dirtyBound(), etc....
>> >>
>> >> But I hope there is a clearer and easier way to achieve this.
>> >>
>> >> Please let me know.
>> >>
>> >> Thanks for any help.
>> >> Fausto
>> >>
>> >> _______________________________________________
>> >> osg-users mailing list
>> >> [email protected]
>> >>
>> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >>
>> >>
>> > _______________________________________________
>> > osg-users mailing list
>> > [email protected]
>> >
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to