From 3c5e0a219e49342dc4cc6109a7138efd86c0596a Mon Sep 17 00:00:00 2001 From: Octogonapus Date: Tue, 14 Jul 2020 10:00:22 -0400 Subject: [PATCH 1/2] Add a flag to allow renderloop early exit --- src/rendering.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rendering.jl b/src/rendering.jl index 165f162..9ef469f 100644 --- a/src/rendering.jl +++ b/src/rendering.jl @@ -1,6 +1,6 @@ function vsynced_renderloop(screen) - while isopen(screen) + while isopen(screen) && !WINDOW_CONFIG.exit_renderloop[] pollevents(screen) # GLFW poll screen.render_tick[] = nothing if WINDOW_CONFIG.pause_rendering[] @@ -16,7 +16,7 @@ end function fps_renderloop(screen::Screen, framerate=WINDOW_CONFIG.framerate[]) time_per_frame = 1.0 / framerate - while isopen(screen) + while isopen(screen) && !WINDOW_CONFIG.exit_renderloop[] t = time_ns() pollevents(screen) # GLFW poll screen.render_tick[] = nothing @@ -61,10 +61,10 @@ const WINDOW_CONFIG = ( pause_rendering = Ref(false), focus_on_show = Ref(false), decorated = Ref(true), - title = Ref("Makie") + title = Ref("Makie"), + exit_renderloop = Ref(false), ) - """ set_window_config!(; renderloop = renderloop, From 3b066c32517db97b171cabe017090d277c69d0a8 Mon Sep 17 00:00:00 2001 From: Octogonapus Date: Tue, 14 Jul 2020 11:49:45 -0400 Subject: [PATCH 2/2] Version bump --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 73237c6..ecbef4d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GLMakie" uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.1.7" +version = "0.1.8" [deps] AbstractPlotting = "537997a7-5e4e-5d89-9595-2241ea00577e"