wiki:GettingStarted

Manual

Getting started

A following code snippet shows you how to start working with the engine. It will initialize the engine singleton and setup basic logging capabilities.

#include <nrEngine/nrEngine.h>

void main()
{
    // initialize logging
    Engine::instance()->initializeLog("log/");
    Engine::sLog()->setLevel(Log::LL_WARNING);

    // initialize essential parts of the engine
    Engine::instance()->initializeEngine();


    ....


    // release the engine and free memory
    Engine::release();
}

Note: You do not have to initialize logging at all. However this helps to determine errors and to debug the engine integration into your application. I would suggest to enable logging during the development of your software (e.g. with level=LL_DEBUG) and to disable it in the release version.

See also: ManualPage