From 5f4cd721c16a142f6bbf1693d20cc60b62e652bf Mon Sep 17 00:00:00 2001 From: bsp2 Date: Fri, 26 Oct 2018 12:25:28 +0200 Subject: [PATCH] redraw window in timer callback --- other/vst2_lglw_debug_plugin/plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/other/vst2_lglw_debug_plugin/plugin.cpp b/other/vst2_lglw_debug_plugin/plugin.cpp index 0cd4c317..114945a2 100644 --- a/other/vst2_lglw_debug_plugin/plugin.cpp +++ b/other/vst2_lglw_debug_plugin/plugin.cpp @@ -96,6 +96,7 @@ static lglw_bool_t loc_keyboard_cbk(lglw_t _lglw, uint32_t _vkey, uint32_t _kmod static void loc_timer_cbk(lglw_t _lglw) { printf("vstgltest: lglw_timer_cbk: tick\n"); + lglw_redraw(_lglw); } static void loc_redraw_cbk (lglw_t _lglw); @@ -166,7 +167,7 @@ public: lglw_timer_callback_set(lglw, &loc_timer_cbk); lglw_redraw_callback_set(lglw, &loc_redraw_cbk); - lglw_timer_start(lglw, 200); + lglw_timer_start(lglw, 1000/30); #endif // USE_LGLW window_to_wrapper = this; @@ -492,6 +493,7 @@ VstIntPtr VSTPluginDispatcher(VSTPlugin *vstPlugin, VstInt32 opCode, VstInt32 in #ifdef USE_LGLW if(lglw_window_is_visible(wrapper->lglw)) { + // lglw_events(wrapper->lglw); wrapper->redrawWindow(); } #endif // USE_LGLW