async runner order adjustment
[vg.git] / vg.h
diff --git a/vg.h b/vg.h
index 4b8956a1989c7cd5ff7ba57d7b65712a606de78a..9f7ebe89f48efaca5200b57ca65a1820570efe42 100644 (file)
--- a/vg.h
+++ b/vg.h
@@ -173,6 +173,7 @@ struct vg{
    quality_profile;
 
    float loader_ring;
+   GLuint tex_missing;
 }
 static vg = { .time_rate = 1.0 };
 const char *vg_get_basepath(void){
@@ -292,6 +293,7 @@ static void _vg_load_full( void *data )
    vg_preload();
 
    /* internal */
+   vg_tex2d_replace_with_error( &vg.tex_missing );
    vg_loader_step( vg_input_init, vg_input_free );
    vg_loader_step( vg_lines_init, NULL );
 #ifndef VG_NO_AUDIO
@@ -303,6 +305,8 @@ static void _vg_load_full( void *data )
 
    /* client */
    vg_load();
+
+   vg_success( "Client loaded in %fs\n", vg.time_real );
 }
 
 static void _vg_process_events(void)
@@ -591,6 +595,7 @@ static void _vg_gameloop(void){
       double dt = (double)udt / (double)SDL_GetPerformanceFrequency();
 
       vg.time_frame_delta += dt;
+      vg_run_async_checked();
 
       if( vg_framefilter( dt ) )
          continue;
@@ -605,7 +610,6 @@ static void _vg_gameloop(void){
       vg.time_delta = vg.time_frame_delta * vg.time_rate;
       vg.time += vg.time_delta;
 
-      vg_run_async_checked();
       _vg_process_events();
 
       if( vg.window_should_close )