[Bf-blender-cvs] [1c6ca9dc905] blender2.8: Fix animation player
Campbell Barton
noreply at git.blender.org
Tue Jun 19 16:14:16 CEST 2018
Commit: 1c6ca9dc90585ae6db261c21b965897397bbe176
Author: Campbell Barton
Date: Tue Jun 19 16:13:10 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1c6ca9dc90585ae6db261c21b965897397bbe176
Fix animation player
===================================================================
M source/blender/windowmanager/intern/wm_playanim.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list