Hi Vladimir

Im guessing you would still have a problem regarding costal areas, my bet
would be that you would have many nodes that contain both water and land.

Im guessing you should find a way to treat this on the pixel level.

Either by encoding it in the texture or elevation data, or by using stencil
texhniques.

Brgs.

Ralf Stokholm
www.arenalogic.com

2009/1/11 Jean-Sébastien Guay <[email protected]>

> Hello Vladimir,
>
> So I wrote NodeVisitor that returns a NodeList of nodes that matching a
>> certain name.
>> But I'm afraid such approach is far not the best (and definitely not so
>> fast, because in depth there's a strcomp() somewhere).
>>
>
> Well, if your NodeVisitor runs in the frame loop of course it's probably
> not best way... The solution might be to only run the visitor at startup
> (when loading the terrain), and save the list of node pointers it returns
> for later. This will work fine if your terrain doesn't change. If there's a
> possibility that your terrain changes, then you can always run the visitor
> only when the terrain changes, so (if the visitor is really slow) you might
> get a frame hit at that time but after that it will be fine.
>
> In any case, apart from these ideas on how to do things better, for any
> performance concern like this one, the general guidelines apply:
> 1. Profile the code and see if it's using up a significant amount of time.
> If not, then don't waste time optimizing it.
> 2. If you get a solid 60Hz, it's not worth wasting time optimizing this.
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.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