Mercurial > molko
diff doxygen/page-howto-initialization.c @ 77:837ef1d387b4
doc: improve documentation
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 31 Jan 2020 13:48:27 +0100 |
parents | |
children | e82eca4f8606 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doxygen/page-howto-initialization.c Fri Jan 31 13:48:27 2020 +0100 @@ -0,0 +1,39 @@ +/** + * \page howto-init Howto: initialization + * \tableofcontents + * + * Howto initialize the core. + * + * \section synopsis Synopsis + * + * Before using the core, you need to initialize the subsystems and internal + * backend API. + * + * \warning Even non-rendering modules requires initialization and some of them + * even require a window to be open. + * + * \section usage Usage + * + * The following table summarize the functions to be used at the beginning and + * the end of your game. + * + * | System | Init function | Close function | Remarks | + * |---------|------------------|-------------------|------------------------| + * | General | \ref sys_init | \ref sys_close | Required for most API | + * | Window | \ref window_init | \ref window_close | Required by some parts | + * + * All init functions set an error code if any and you're encouraged to test the + * result and check the error if any. + * + * \section example Example + * + * Init the core and create a window of Full HD resolution. The function \ref + * error_fatal will print the error and exit if needed. + * + * \code + * if (!sys_init()) + * error_fatal(); + * if (!window_init("My Awesome Game", 1920, 1080)) + * error_fatal(); + * \endcode + */