lnvis

nanovg lightning network visualizer
git clone git://jb55.com/lnvis
Log | Files | Refs | README | LICENSE

commit 255bdfc2d595cc3f84c06bd4931f3b642c0d77e2
parent 0d66fb94eaa5ff083587750484c0a6ad5e099c9a
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 17 Aug 2018 08:59:48 -0700

fps toggle

Diffstat:
MREADME.md | 1+
Mln.h | 1+
Mmain.c | 7++++++-
3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -21,6 +21,7 @@ channel/node output is supported ``` b view multiple channels between nodes t toggle dark/light theme +f toggle fps a toggle aliases g toggle grid s toggle stroked nodes (small perf boost) diff --git a/ln.h b/ln.h @@ -108,6 +108,7 @@ enum display_flags { DISP_ALIASES = 1UL << 2, DISP_STROKE_NODES = 1UL << 3, DISP_BEZIER = 1UL << 4, + DISP_FPS = 1UL << 5, }; struct ln { diff --git a/main.c b/main.c @@ -90,6 +90,9 @@ void key_callback(GLFWwindow* window, int key, int scancode, int action, int mod case GLFW_KEY_A: ln.display_flags ^= DISP_ALIASES; break; + case GLFW_KEY_F: + ln.display_flags ^= DISP_FPS; + break; case GLFW_KEY_S: ln.display_flags ^= DISP_STROKE_NODES; break; @@ -322,7 +325,9 @@ int main() /* renderDemo(vg, mx, my, winWidth, winHeight, t, 1, &data); */ update(&ln, dt); render_ln(&ln); - renderGraph(vg, 5, 5, &fps); + + if (ln.display_flags & DISP_FPS) + renderGraph(vg, 5, 5, &fps); nvgEndFrame(vg);