| | 1 | = Manual = |
| | 2 | == Getting started == |
| | 3 | |
| | 4 | A following code snippet shows you how to start working with the engine. It will initialize the engine singleton and setup basic logging capabilities. |
| | 5 | |
| | 6 | {{{ |
| | 7 | #include <nrEngine/nrEngine.h> |
| | 8 | |
| | 9 | void main() |
| | 10 | { |
| | 11 | // initialize logging |
| | 12 | Engine::instance()->initializeLog("log/"); |
| | 13 | Engine::sLog()->setLevel(Log::LL_WARNING); |
| | 14 | |
| | 15 | // initialize essential parts of the engine |
| | 16 | Engine::instance()->initializeEngine(); |
| | 17 | |
| | 18 | |
| | 19 | .... |
| | 20 | |
| | 21 | |
| | 22 | // release the engine and free memory |
| | 23 | Engine::release(); |
| | 24 | } |
| | 25 | }}} |
| | 26 | |
| | 27 | 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. |