Book Image

Irrlicht 1.7 Realtime 3D Engine Beginner's Guide

By : Johannes Stein, Aung Sithu Kyaw
Book Image

Irrlicht 1.7 Realtime 3D Engine Beginner's Guide

By: Johannes Stein, Aung Sithu Kyaw

Overview of this book

<p>The Irrlicht Engine is a cross-platform high-performance real-time 3D engine written in C++. It features a powerful high-level API for creating complete 3D and 2D applications such as games or scientific visualizations.<br /><br />Irrlicht 1.7 Realtime 3D Engine Beginner's Guide will teach you to master all that is required to create 2D and 3D applications using Irrlicht, beginning right from installation and proceeding step-by-step to deployment.<br /><br />Beginning with installation, this book guides you through creating a basic template application, followed by meshes, overlays, and UI. You will then scan through data types, nodes, scenes, camera, lights, and particle systems. Finally, you will learn about some advanced concepts such as handling data, files, and shaders, followed by the last stage – deployment.</p>
Table of Contents (21 chapters)
Irrlicht 1.7 Realtime 3D Engine
Credits
About the Authors
Acknowledgement
About the Reviewer
www.PacktPub.com
Preface

Time for action - extending our template application


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

  1. 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. 2. Add smgr->drawAll(); in our loop.

  3. 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. 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 from Chapter 4, Overlays and User Interface, where we created an event receiver for our GUI environment.

  5. 5. Now create your own event receiver class that inherits from IEventReceiver called CAppReceiver. This event...