diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-19 17:13:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-19 17:13:23 +0300 |
commit | 1c6ca9dc90585ae6db261c21b965897397bbe176 (patch) | |
tree | 7b0d67947d201d2c1adebf123e472f4160ecd63b /source/blender/windowmanager | |
parent | e49f6bb2088cfe8c80ff32f88b3aec1d217f6899 (diff) |
Fix animation player
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index d93d51df105..835c4c14207 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -66,6 +66,7 @@ #include "GPU_matrix.h" #include "GPU_immediate.h" #include "GPU_immediate_util.h" +#include "GPU_batch.h" #include "DNA_scene_types.h" #include "ED_datafiles.h" /* for fonts */ @@ -179,6 +180,7 @@ typedef enum eWS_Qual { static struct WindowStateGlobal { GHOST_SystemHandle ghost_system; void *ghost_window; + Gwn_Context *gwn_context; /* events */ eWS_Qual qual; @@ -1262,6 +1264,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) //GHOST_ActivateWindowDrawingContext(g_WS.ghost_window); /* initialize OpenGL immediate mode */ + g_WS.gwn_context = GWN_context_create(); immInit(); /* initialize the font */ @@ -1538,6 +1541,12 @@ static char *wm_main_playanim_intern(int argc, const char **argv) immDestroy(); + if (g_WS.gwn_context) { + GWN_context_active_set(g_WS.gwn_context); + GWN_context_discard(g_WS.gwn_context); + g_WS.gwn_context = NULL; + } + BLF_exit(); GHOST_DisposeWindow(g_WS.ghost_system, g_WS.ghost_window); |