6. Initialization

6.1. GFX Framebuffer initialization from scheme

Initialization must be explicitely called in scheme using the function monolith:gfx-fb-init.

<<gfx_scheme_entries>>=
{"monolith:gfx-fb-init", pp_fb_init, 0, 0, {___,___,___}},
<<gfx_scheme_functions>>=
static cell pp_fb_init(cell p)
{
    monolith_d *m;
    m = monolith_data_get();
    monolith_gfx_fb_init(m);
    return UNSPECIFIC;
}

6.2. GFX Framebuffer initialization from Janet

<<gfx_janet>>=
static Janet j_gfx_fb_init(int32_t argc, Janet *argv)
{
    janet_fixarity(argc, 0);
    monolith_gfx_fb_init(monolith_data_get());
    return janet_wrap_nil();
}
<<gfx_janet_entries>>=
{
"monolith/gfx-fb-init",
j_gfx_fb_init,
"Initializes monolith framebuffer for drawing."
},



prev | home | next