DotSceneManager Confusion

Problems building or running the engine, queries about how to use features etc.
Knox_36606
Gnoblar
Posts: 4
Joined: Wed Jan 26, 2005 9:57 pm

DotSceneManager Confusion

Post by Knox_36606 »

I am new to this whole thing, so yes I am easily confused...but the DotSceneManager tutorial seems to take you in one direction, and then when I look at the code it takes me in another direction.

The tutorial says I need to add the ST_DOT_SCENE enum, and initialize it in the constructor:

Code: Select all

    enum SceneType
    {
        ST_GENERIC,
        ST_EXTERIOR_CLOSE,
        ST_EXTERIOR_FAR,
        ST_EXTERIOR_REAL_FAR,
        ST_INTERIOR,
        ST_DOT_SCENE
    };

    SceneManagerEnumerator::SceneManagerEnumerator()
    {
        // Create default manager
        mDefaultManager = new SceneManager();

        // All scene types defaulted to begin with (plugins may alter this)
        setSceneManager(ST_GENERIC, mDefaultManager);
        setSceneManager(ST_EXTERIOR_REAL_FAR, mDefaultManager);
        setSceneManager(ST_EXTERIOR_FAR, mDefaultManager);
        setSceneManager(ST_EXTERIOR_CLOSE, mDefaultManager);
        setSceneManager(ST_INTERIOR, mDefaultManager);
        setSceneManager(ST_DOT_SCENE, mDefaultManager);
    }
But then I look at the code for the plugin and demo and see:

Code: Select all

DotSceneManagerDLL.cpp
    extern "C" void dllStartPlugin( void )
    {
        // Create new scene manager
        DotScenePlugin = new DotSceneManager();
        DotSceneResourceManager = new SceneResourceManager();

        // Register
        Root::getSingleton().setSceneManager( ST_GENERIC, DotScenePlugin );
    }

Demo_DotScene.h:
    void chooseSceneManager(void)
    {
        mDotSceneMgr = static_cast <DotSceneManager *> ( mRoot->getSceneManager(ST_GENERIC) );
        mSceneMgr = mDotSceneMgr;
    }
It is very possible that I am missing something, but as I see it if I modify OgreMain as the tutorial says and set

Code: Select all

        mDotSceneMgr = static_cast <DotSceneManager *> ( mRoot->getSceneManager(ST_DOT_SCENE) );
and use the plugin as it compiles (registering as ST_GENERIC) then when I ask for ST_DOT_SCENE...what I will really get is Generic, but if I ask for ST_GENERIC then I should get a DotScene...

Which way is up?

Thanks,
Knox
ludoz
Gnoblar
Posts: 17
Joined: Sun Jan 16, 2005 8:00 pm
Location: italy

Post by ludoz »

i asked this question at myself too...
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

ST_DOT_SCENE is outdated. DotScene registers as ST_GENERIC now.
team-pantheon programmer
creators of Rastullahs Lockenpracht