Fix major overstep with last commit
[carveJwlIkooP6JGAAIwe30JlM.git] / world_render.h
index 3662bb19f1447f0333ea23e52a1bee56040f7d57..52b291376d155b6ffb27afe8c2cde1fc0921dc44 100644 (file)
@@ -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 );