summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-10-20 20:46:05 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-10-20 20:46:05 -0700
commit90ce0330f586dd7c0114beed6775ea6d47cf7c67 (patch)
tree1bfaf3843de7f2c19cf96b31c2b2b449dcfbd73a
parent6d8677b4bd346efabd662fc11f2f4fc6bdba3dd6 (diff)
pig: increase shader reload interval from .1 to 1s
.1s affected frame rate too much mid-cycle
-rw-r--r--README2
-rw-r--r--src/pig.c2
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 */
© All Rights Reserved