Hello Allen,
Allen Bierbaum wrote:
> I am just starting to use the new trunk code for OpenSG. It looks
> like a lot has changed and there are now a *lot* more pointer types
> (5??). I am trying to figure out what I should be using and running
> into some issues.
>
>> >From the documentation here:
> http://opensg.vrsource.org/trac/wiki/Tutorial/OpenSG2/Basics
>
> It sounds like RecPtr holds a referenced counted pointer, but that it
> only works in a single aspect and that to use a pointer that can be
> used in multiple aspects you would have to use MTRecPtr. Is that
> correct?
yes, except for MTRecPtr none of the pointer types work across multiple
aspects.
> For example if I had code with the following threads:
>
> - Main: Traversal, rendering
> - DB: Load items in the background, sync into main thread periodically
> - Work: Background thread to do work on nodes that came from the main thread
>
> Then would I need to use MTRecPtr?
only if you pass around pointers across aspects. I can see that is quite
likely the case between Main and Work, e.g. if Work has a queue in which
you put (from Main) pointers to nodes that need to be processed, that
should be a queue of NodeMTRecPtr.
And for Main and DB: if you pass a pointer from Main to DB to indicate
where to add loaded stuff that should be a MTRecPtr. For most (all?)
other pointers I don't see where they cross an aspect boundary so you do
not need the MTRecPtr, just RecPtr is fine.
> By the same token, what ptr corresponds to the old RefPtr? (it looks
> like it would be MTRecPtr)
yes.
> Also, are the old XxxxNodePtr's still around and which type of ptr
> (MTRecPtr/RecPtr) do they use to hold their data? (ie. are they thread
> safe).
there are XxxxNodeRefPtr and XxxxNodeMTRefPtr.
Hm, maybe these should be called Rec instead?
Cheers,
Carsten
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users