twn_filewatch.c: file and directory change api, initial support for texture reload
This commit is contained in:
@ -308,6 +308,8 @@ static void update_texture_rects_in_atlas(TextureCache *cache, stbrp_rect *rects
|
||||
|
||||
|
||||
void textures_cache_init(TextureCache *cache, SDL_Window *window) {
|
||||
SDL_zero(*cache);
|
||||
|
||||
cache->window = window;
|
||||
sh_new_arena(cache->hash);
|
||||
|
||||
@ -581,4 +583,6 @@ size_t textures_get_num_atlases(const TextureCache *cache) {
|
||||
}
|
||||
|
||||
void textures_reset_state(void) {
|
||||
textures_cache_deinit(&ctx.texture_cache);
|
||||
textures_cache_init(&ctx.texture_cache, ctx.window);
|
||||
}
|
||||
|
Reference in New Issue
Block a user