Exemplo n.º 1
0
ilA_mesh *ilA_mesh_loadfile(const char *path)
{
    size_t size;
    void *data;
    il_base *base = ilA_contents_chars(path, &size, &data, NULL);
    ilA_mesh *mesh = ilA_mesh_loadmem(path, data, size);
    il_unref(base);
    return mesh;
}
Exemplo n.º 2
0
il_base *ilA_stdiofile(const ilA_path *path, enum ilA_file_mode mode, const ilA_file **res)
{
    struct stdiofile *f = il_new(&il_stdiofile_type);
    f->mode = mode;
    f->path = ilA_path_tochars(path);
    if (access(f->path, F_OK)) {
        il_unref(f);
        return NULL;
    }
    if (res) {
        *res = &il_stdiofile_file;
    }
    return &f->base;
}
Exemplo n.º 3
0
static void text_des(void *obj)
{
    ilG_gui_textlayout *self = obj;
    il_unref(self->font);
    free(self->lang);
    free(self->script);
    il_string_unref(self->source);

    hb_buffer_destroy(self->buf);
    hb_face_destroy(self->hb_ft_face);
    hb_font_destroy(self->hb_ft_font);

    cairo_destroy(self->cr);
    cairo_surface_destroy(self->surface);
    cairo_font_face_destroy(self->cairo_ft_face);

    FT_Done_Face(self->ft_face);
}
Exemplo n.º 4
0
static void heightmap_free(void *ptr)
{
    ilG_heightmap *self = ptr;
    il_unref(self->shader);
    free(self);
}
Exemplo n.º 5
0
static void prefix_des(void *ptr)
{
    struct prefix *self = ptr;
    ilA_path_free(self->path);
    il_unref(self->dir);
}