As usual the base for this example is our template application from Chapter 2,
1. Add
scene
to your namespace, then add an instance ofISceneManager
with the lineISceneManager* smgr = device->getSceneManager()
;, just afterIVideoDriver* 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 callsdevice->yield()
.4. Add
gui
to your namespace, an instance ofIGUIEnvironment
namedguienv
, assign it withdevice->getGUIEnvironment()
and add calldrawAll()
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. Now create your own event receiver class that inherits from
IEventReceiver
calledCAppReceiver
. This event...