[SOLVED] Multiple scenemanagers

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
KP84
Posts: 44
Joined: Thu Feb 24, 2011 5:08 am

[SOLVED] Multiple scenemanagers

Post by KP84 »

Why using multiple scenemanagers?

Does this make any sense?

Code: Select all

  if( cam & LOC_INSIDE )
    {
     sceneWorldLowPoly->drawAll()
     if( cam & LOC_PRECISELOCATION1 )
       sceneInsideB1->drawAll() else
     if( cam & LOC_PRECISELOCATION2 )
      sceneInsideB2->drawAll()
    } else
    {
    sceneWorld->drawAll()
    }
  sceneCharacters->drawAll() // or drawSome(todo)
  sceneCars->drawAll() // idem
Last edited by KP84 on Tue Jun 07, 2011 9:00 pm, edited 1 time in total.

Code: Select all

// if you think real code is always interresting, read this line again
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I use multiple scene managers in my Stunt Marble Racers game to display different scenes at the same time, e.g. I have a background scene with my "company" logo rotating and a preview of the selected racetrack.

But I got no idea what you're trying to do with your snippet.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

I on the other hand, use just a single scene manager to render everything. Either approach is fine.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
KP84
Posts: 44
Joined: Thu Feb 24, 2011 5:08 am

Post by KP84 »

@Brainsaw
Brainsaw wrote:But I got no idea what you're trying to do with your snippet.
If you have an entire world you that would mean a lot of polies. So you have to cut some details due to fps. However I don't want to loose too much detail. In order to achieve that I think to create two worlds, one normal high poly and one low poly. Because if you are inside you have no use for most of the high-poly world (about 99%) and vise versa. This gives the advantage of having more detail (bottle, clothes on tables, candles etc.) inside instead of the trade-off with 2d images wich will be used when player is outside. So I believe at this point.

The scenes will remain in memory but will not rendered and frustum/octree/distance or whatever check is not needed. Don't know yet if this will work but I am about to try out :) or how exactly to implement it (loading/unloaded meshes)

Also I have started (since today) to use physics and creating my own wrapper (one line of code already done 8) ) and I really have no clue on how to create the wrapper yet. As Bullet uses some sort of scenemanager too, i am wondering how to combine things.

@Mel
So it's not needed, at least not always. One insecurity less.

@Brainsaw
@Mel
Thanks both for the insights.

KP84

Code: Select all

// if you think real code is always interresting, read this line again
Post Reply