#include </opt/build/repo/nap/cmake/app_creator/template/src/templateapp.h>
Public Member Functions | |
APP_NAME_INPUTCASE | App (nap::Core &core) |
bool | init (utility::ErrorState &error) override |
void | update (double deltaTime) override |
void | render () override |
void | windowMessageReceived (WindowEventPtr windowEvent) override |
void | inputMessageReceived (InputEventPtr inputEvent) override |
virtual int | shutdown () override |
App (Core &core) | |
virtual void | inputMessageReceived (InputEventPtr inputEvent) |
virtual void | windowMessageReceived (WindowEventPtr windowEvent) |
Main application that is called from within the main loop
The default NAP application. Derive from this object to receive mouse, keyboard and window events. Override inputMessageReceived to receive mouse and keyboard events. Override windowMessageReceived to receive window events. This class works in conjunction with an AppEventHandler which polls and forwards incoming system messages.
Constructor
core | instance of the NAP core system |
|
override |
Initialize all the services and app specific data structures
error | contains the error code when initialization fails |
|
virtual |
Called when the system receives an input event
inputEvent | the received input event |
|
override |
Called when the app receives an input message (from a mouse, keyboard etc.)
inputEvent | the input event that occurred |
|
override |
Render is called after update. Use this call to render objects to a specific target
|
overridevirtual |
Called when the app is shutting down after quit() has been invoked
|
override |
Update is called every frame, before render.
deltaTime | the time in seconds between calls |
|
virtual |
Called when the system receives a window event
windowEvent | the event that contains the window information |
|
override |
Called when the app receives a window message.
windowEvent | the window message that occurred |