Hi Gerrit,
thanks for your hints.
Syncing aspects sequentially, does sound expensive above a certain number.
What do you think about adding a pre-allocation of aspect store vectors
before starting OpenSG?
This old solution would prevent the necessity to reallocate the vectors
(which makes for the crashes). I think it is a viable solution, as in an
application
using, for example, 3 aspects you have to add:
OSG::AspectStore::setNumAspects(3);
OSG::osgInit(argc, argv);
In OSGAspectStore.h:
static void setNumAspects (unsigned num);
static unsigned getNumAspects ();
In OSGAspectStore.inl:
inline unsigned& AspectStore::getNumAspects ()
{
static unsigned _sNumAspects = 2;
return _sNumAspects;
}
inline void AspectStore::setNumAspects (unsigned num)
{
getNumAspects() = num;
}
inline AspectStore::AspectStore(void) :
_vAspects(getNumAspects()),
_refCount(0)
{
}
inline AspectStore::AspectStore(const AspectStore &) :
_vAspects(getNumAspects()),
_refCount(0)
{
}
Thanks,
Christoph
On 19.12.2011 05:22, Gerrit Voß wrote:
> Hi,
>
> On Fri, 2011-12-16 at 11:45 +0100, "Christoph Fünfzig" wrote:
>> > Hi all,
>> >
>> > I again have to ask some questions ;)
>> > I changed the basic example into one which uses "numChannels" windows,
>> > so more than 2 aspects.
>> > Unfortunately, I get a crash during reallocation of aspect storage,
>> > please see the call stack.
>> > Perhaps it is meant to be used differently ..
> not quite, it is a lingering problem. Currently one has to sync aspects
> sequentially. For example the CSMDrawer synchronization looks like the
> following for that reason:
>
> _pSyncBarrier->enter (_uiSyncCount);
>
> # ifdef OSG_GLOBAL_SYNC_LOCK
> _pSyncLock->acquire();
> # endif
> _pSyncFromThread->getChangeList()->applyNoClear();
>
> # ifdef OSG_GLOBAL_SYNC_LOCK
> _pSyncLock->release();
> # endif
>
> _pSyncBarrier->enter (_uiSyncCount);
>
> So only one drawer at a time applies the app changelist.
>
> I will look into it so that we can get rid of this global lock and
> spin lock the containers while applying the changelists.
>
> kind regards
> gerrit
>
>
>
> ------------------------------------------------------------------------------
> Learn Windows Azure Live! Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users