O'Reilly logo

Irrlicht 1.7 Realtime 3D Engine by Aung Sithu Kyaw, Johannes Stein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - extending our template application

As usual the base for this example is our template application from Chapter 2,

  1. Add scene to your namespace, then add an instance of ISceneManager with the line ISceneManager* smgr = device->getSceneManager();, just after IVideoDriver* driver = device->getVideoDriver();.
  2. Add smgr->drawAll(); in our loop.
  3. Directly in the game loop add the condition if (device->isWindowActive()), which results in the current code block we have in our loop and else calls device->yield().
  4. Add gui to your namespace, an instance of IGUIEnvironment named guienv, assign it with device->getGUIEnvironment() and add call drawAll() of this instance in your application loop. If you are not sure, do take a look at the examples ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required