Menu

New objects not showing after flipping scene

Bart
2006-08-11
2013-04-25
  • Bart

    Bart - 2006-08-11

    Hi

    First of all thanks for Brume and sharing it with us !!

    I've the following issue, maybe you can help. In my app I have different 'screens' or 'scenes' the first scene is created in GameInit(), it shows fine. When I switch to the next screen (e.g in AfterRendering()) I destroy all objects with engine.GetObjects().Clear(); and build my new scene, but none of my new scene is visible!!

    The workaround I found is calling something like engine.GraphicApi.InitEngineMode(engine.InitStates); after creating the new objects, then my new scene appears ok but I doubt if this is the correct way. Also the debug console continuous to show the objects of the previous scene ?? Is there a specific call to update the engine with the new objects ?

    Thanks a lot
    Bart

     
    • Chris

      Chris - 2006-08-11

      Hi Bart !

      Thanks for using Brume ! It's always nice to have some feedback ;o)

      I think that the best way to do your 'scene switch' is to use these methods :
         public void InitObject(BrumeObject obj)
         public void DestroyObject(BrumeObject obj)
      They are both available on the BrumeEngine class (your main class).
      After adding your new object just call the InitObject method to put it into a 'renderable' state.

      I should try to automate this one...

      Silmaryls

       
    • Bart

      Bart - 2006-08-11

      Hi Silmaryls,

      Thanks for your response, that worked!

      Also, if I call engine.DebugConsole.InitDebugConsole(); after creating my new scene, the debug console (great feature by the way) is up-to-date as well...

      Regards
      Bart

       

Log in to post a comment.