Root.Singleton

Burst

11-02-2010 09:12:57

I hava some questions about Root.Singleton.
What does the attribute mean?
It equals null when I didn't create any Root Object, it's not null after I create a Root Object, but it doesn't equals the Root Object I just created.
Could I create multiple Root Objects in an application?
Please help me.

smiley80

11-02-2010 10:02:43

Root.Singleton is essentially the same as the last Root you've created.
The references aren't equal because the property getter creates a new managed Root object, but the underlying native object is the same.

You should only create the Root once, and then use the reference to that or the singleton.

Burst

20-02-2010 08:23:05

Thank you for helping me.
Another question, is there a wrapper of ogreode for mogre?

smiley80

20-02-2010 18:41:59

Well, there's OdeNet, but that's pretty outdated (ODE 0.7; Mogre 0.2).
You should take a look at MogreNewt instead.