void ilG_tex_loadfile(ilG_tex *self, const char *file) { ilA_img *img = ilA_img_loadfile(file); if (!img) { return; } ilG_tex_loadimage(self, img); }
ilA_imgerr ilG_tex_loadfile(ilG_tex *tex, ilA_fs *fs, const char *file) { ilA_img img; ilA_imgerr res = ilA_img_loadfile(&img, fs, file); if (res) { return res; } ilG_tex_loadimage(tex, img); return ILA_IMG_SUCCESS; }
void ilG_tex_loadasset(ilG_tex *self, const struct ilA_file *iface, void *file) { size_t size; void *contents = ilA_contents(iface, file, &size); ilG_tex_loadimage(self, ilA_img_load(contents, size)); }