Hello Marcus,

Marcus Lindblom wrote:
> Carsten Neumann wrote:
>> Is there a way to force the 
>> construction to happen early ? (What triggers the construction anyways ?)
> 
> Construction of these are on demand, so just call 
> getDefault[unlit]Material().

hm, that creates the default materials, I was wondering more about what 
creates the pointer objects (i.e. the objects of type 
SimpleMaterialMTRefPtr) that point to them.
*If* these are also created "on demand" (and it looks like they are [1]) 
we have a problem, because while we could call getDefaultMaterial() from 
osgInit it would break separation of base and system lib and does not 
generalize well to other, similar situations. We could use a statically 
created object to call addPostFactoryInitFunction with a function that 
just calls getDefaultMaterial, but I don't see why that object should be 
"on demand"-created at all?
I need to see if/what the standard has to say on the point in time when 
static objects are created.

        Thanks,
                Carsten


[1] If not, they should be created before osgInit runs and therefore 
destroyed after the atexit handler that calls osgExit and everything 
should be fine, but since it crashes ...

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to