Chris 'Xenon' Hanson wrote:
>   I'm just wondering -- other than myself, are there any others (excluding 
> Robert,
> obviously) who have delved into the code for PagedLOD and DatabasePager and 
> actually done
> any coding in there?


  I'll throw out an item that I think should be discussed from my recent work:

DatabasePager.cpp, capped_removeExpiredSubgraphs() has a line of coding that 
says:

MarkPagedLODsVisitor markerVistor("NeedToRemove");

  This visitor, when applied, goes through the _inactivePagedLODList, and 
renames a
certain number of the contents to "NeedToRemove". Later, if you are NOT using 
the
_deleteRemovedSubgraphsInDatabaseThread option, it removes PagedLOD nodes that 
have this name.

  This seems to me to be a dangerous usage of the node name. Granted, it's very 
unlikely
that you'd have a node named "NeedToRemove", but it underscores that the 
practice of
assigning special meaning to the node name isn't especially safe. I think it 
would be wise
to clean the node names as the nodes are added to the _inactivePagedLODList so 
that none
of them could ever possibly enter into the list already bearing the name 
"NeedToRemove".
What I haven't figured out is if there's ever a situation where a node _leaves_ 
the
inactive list and returns to the active scenegraph without being deleted. In 
this case,
any tampering of the node name would have undesirable results.

  It does raise another question -- is this a common practice and is there 
anywhere else
in OSG where node name has a special meaning during specific phases of 
operation? This
particular one is not documented anywhere I know of. In this case, the failure 
mode would
be pretty benign -- the DatabasePager could accidentally destroy too many 
inactive
PagedLOD nodes in one frame-idle period. Normally this is constrained by the
_targetMaximumNumberOfPageLOD. So, maybe this failure could cause the redraw to 
break
framerate. Nothing fatal.

  And finally, is there a better extensible way to go about marking arbitrary 
nodes for
later processing (while potentially still in the scenegraph, even though this 
case has
them removed from the scenegraph by this point)? Any fast boolean flag will be 
immediately
overwhelmed because everyone will want to use it and they'll collide. But any 
extensible
method would seem to involve allocating and attaching some sort of dynamic 
marker, which
is not especially efficient.

  Any thoughts?


-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to