fixed flicker
authorhgn <hgodden00@gmail.com>
Sun, 2 Jul 2023 21:47:13 +0000 (22:47 +0100)
committerhgn <hgodden00@gmail.com>
Sun, 2 Jul 2023 21:47:13 +0000 (22:47 +0100)
vg.h
vg_loader.h

diff --git a/vg.h b/vg.h
index 0e9e3e55fe1022fa1123a6dc8dd8f2d56b504c4f..5cae23e045981fc934f9083a3e6018c4cd4655fc 100644 (file)
--- a/vg.h
+++ b/vg.h
@@ -568,8 +568,7 @@ VG_STATIC int _vg_crashscreen(void)
    return 0;
 }
 
-VG_STATIC void _vg_gameloop(void)
-{
+VG_STATIC void _vg_gameloop(void){
    //vg.time_fixed_accumulator = 0.75f * (1.0f/60.0f);
 
    vg.time_hp = SDL_GetPerformanceCounter();
@@ -619,8 +618,8 @@ VG_STATIC void _vg_gameloop(void)
       }
 
       if( vg.loader_ring > 0.01f ){
-         vg.loader_ring -= vg.time_frame_delta * 0.5f;
          _vg_loader_render_ring( vg.loader_ring );
+         vg.loader_ring -= vg.time_frame_delta * 0.5f;
       }
 
       vg.time_frame_delta = 0.0;
index 37b7b9ff4924f90b3c94f6f6620a039993e90fc2..e93926c835116df743f97fd0ce1756544656ec59 100644 (file)
@@ -184,7 +184,7 @@ VG_STATIC void _vg_loader_render(void)
    glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT );
 
    _vg_render_log();
-   vg.loader_ring = 0.8f;
+   vg.loader_ring = 1.0f;
 }