X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_render.h;h=52b291376d155b6ffb27afe8c2cde1fc0921dc44;hb=d13f2700b1773551307685cc7c34c804ccd6d664;hp=3662bb19f1447f0333ea23e52a1bee56040f7d57;hpb=86dbcd5796ed674ca9433cce1ace8bef322cd121;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_render.h b/world_render.h index 3662bb1..52b2913 100644 --- a/world_render.h +++ b/world_render.h @@ -17,7 +17,21 @@ vg_tex2d tex_graffiti = { .path = "textures/graffitibox.qoi", static void world_render_init(void) { - vg_tex2d_init( (vg_tex2d *[]){ &tex_terrain_colours, + vg_info( "Loading default world textures\n" ); + + vg_acquire_thread_sync(); + { + vg_tex2d_init( (vg_tex2d *[]){ &tex_terrain_colours, + &tex_terrain_noise, + &tex_alphatest, + &tex_graffiti }, 4 ); + } + vg_release_thread_sync(); +} + +static void world_render_free(void*_) +{ + vg_tex2d_free( (vg_tex2d *[]){ &tex_terrain_colours, &tex_terrain_noise, &tex_alphatest, &tex_graffiti }, 4 );