Core.
More...
#include <gf_pre.h>
#include <gf_macro.h>
#include <gf_type/core.h>
#include <gf_type/draw.h>
Go to the source code of this file.
Core.
Definition in file gf_core.h.
◆ gf_engine_begin()
void gf_engine_begin |
( |
void |
| ) |
|
|
extern |
Initialize engine.
Definition at line 24 of file gf_core.c.
◆ gf_engine_create()
gf_engine_t * gf_engine_create |
( |
const char * |
title, |
|
|
int |
nogui |
|
) |
| |
|
extern |
Create engine instance.
- Parameters
-
title | Title to be shown on the window |
nogui | 0 to enable client-part, otherwise disable client-part |
- Returns
- Engine instance
Definition at line 49 of file gf_core.c.
◆ gf_engine_destroy()
Destroy engine instance.
- Parameters
-
Definition at line 92 of file gf_core.c.
◆ gf_engine_end()
void gf_engine_end |
( |
void |
| ) |
|
|
extern |
Cleanup engine.
Definition at line 44 of file gf_core.c.
◆ gf_engine_loop()
Start engine main loop.
- Parameters
-
- Note
- How engine draws a frame internally is explained in gf_core.c
Writing this so I don't forget
- Calls gf_client_step
- gf_client_step calls gf_draw_step
- gf_draw_step calls gf_draw_platform_step (Platform-dependent)
- gf_draw_platform_step processes platform-dependent stuffs (e.g. events)
- gf_draw_platform_step calls gf_draw_driver_before
- gf_draw_platform_step calls gf_draw_frame
- gf_draw_frame draws stuffs
- gf_draw_platform_step calls gf_draw_driver_after
- gf_draw_platform_step swaps buffers
- Comes back here
Definition at line 84 of file gf_core.c.