simplify
authorhgn <hgodden00@gmail.com>
Mon, 24 Apr 2023 12:00:17 +0000 (13:00 +0100)
committerhgn <hgodden00@gmail.com>
Mon, 24 Apr 2023 12:00:17 +0000 (13:00 +0100)
render.h
skaterift.c
world_gen.h
world_render.h

index 440af479f605195d0c763d27e88ef55e631ec1b3..4b3828ba38a8f8f5a7bfc2ae855a019e916ff9b8 100644 (file)
--- a/render.h
+++ b/render.h
@@ -570,8 +570,7 @@ VG_STATIC void render_init(void)
    shader_blitblur_register();
    shader_blitcolour_register();
 
-   vg_async_item *call = vg_async_alloc(0);
-   vg_async_dispatch( call, async_render_init );
+   vg_async_call( async_render_init, NULL, 0 );
 }
 
 /*
index 54e5feb5d202c3f3849be04f1a67cec2a42a4dbb..6246be38d722a9b4651cdbddc578bdb1195713e4 100644 (file)
@@ -160,8 +160,7 @@ VG_STATIC void vg_load(void)
 
    vg_console_load_autos();
 
-   vg_async_item *call = vg_async_alloc(0);
-   vg_async_dispatch( call, async_skaterift_complete );
+   vg_async_call( async_skaterift_complete, NULL, 0 );
 }
 
 VG_STATIC void draw_origin_axis(void)
index 3e7cdb90addbca4605f31b993f8aabfcf674002d..cf713fd69c5438ff2da5a673a98a29f1b915a323 100644 (file)
@@ -548,10 +548,7 @@ VG_STATIC int reset_player( int argc, char const *argv[] );
 VG_STATIC void world_post_process( world_instance *world )
 {
    world_compute_light_indices( world );
-
-   vg_async_item *call = vg_async_alloc(0);
-   call->payload = world;
-   vg_async_dispatch( call, async_world_postprocess_render );
+   vg_async_call( async_world_postprocess_render, world, 0 );
 }
 
 VG_STATIC void world_process_resources( world_instance *world )
index 7fb47b0dc2cb580c9ee3fd1a8521d04643018412..a01c056c32aebe5e332979461cfdbb1d74bc4e2c 100644 (file)
@@ -60,8 +60,8 @@ VG_STATIC void world_render_init(void)
    vg_tex2d_load_qoi_async_file( "textures/garbage.qoi", 
                                  VG_TEX2D_NEAREST|VG_TEX2D_REPEAT, 
                                  &tex_terrain_noise );
-   vg_async_item *call = vg_async_alloc(0);
-   vg_async_dispatch( call, async_world_render_init );
+
+   vg_async_call( async_world_render_init, NULL, 0 );
 }
 
 VG_STATIC void world_link_lighting_ub( world_instance *world, GLuint shader )