From 90ce0330f586dd7c0114beed6775ea6d47cf7c67 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 20 Oct 2020 20:46:05 -0700 Subject: pig: increase shader reload interval from .1 to 1s .1s affected frame rate too much mid-cycle --- README | 2 +- src/pig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 1e4aa8b..b8d21aa 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ paths on argv as such: If the files don't exist or are otherwise unusable, pig will just skip running the shader but continue drawing a checkered bg with -the variables changing as usual. Shaders get reloaded every .1s, +the variables changing as usual. Shaders get reloaded every 1s, so you may edit them in your text editor of choice while watching the output. diff --git a/src/pig.c b/src/pig.c index d547e8f..1af910f 100644 --- a/src/pig.c +++ b/src/pig.c @@ -63,7 +63,7 @@ static void pig_uniforms_func(shader_t *shader, void *uniforms_ctxt, void *rende unsigned t0, t1; float r = randf(); - if (play_ticks_elapsed(play, PLAY_TICKS_TIMER2, 100)) + if (play_ticks_elapsed(play, PLAY_TICKS_TIMER2, 1000)) shader_reload_files(shader); /* this one just keeps increasing */ -- cgit v1.2.3