[Bf-blender-cvs] [ff3880ff93f] blender2.8: Initialize immediate mode in Animation Player
Germano Cavalcante
noreply at git.blender.org
Thu Apr 6 06:54:40 CEST 2017
Commit: ff3880ff93f492e68a5923db4bb32b2c0b189cae
Author: Germano Cavalcante
Date: Thu Apr 6 01:54:10 2017 -0300
Branches: blender2.8
https://developer.blender.org/rBff3880ff93f492e68a5923db4bb32b2c0b189cae
Initialize immediate mode in Animation Player
PS. With this solution, immediate mode can be initialized and finalized consecutively if you drop a video
part of T49043
===================================================================
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 afe46f6c336..f132186157b 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -64,6 +64,7 @@
#include "BIF_gl.h"
#include "GPU_matrix.h"
+#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "DNA_scene_types.h"
@@ -1254,6 +1255,9 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
//GHOST_ActivateWindowDrawingContext(g_WS.ghost_window);
+ /* initialize OpenGL immediate mode */
+ immInit();
+
/* initialize the font */
BLF_init(11, 72);
ps.fontid = BLF_load_mem("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size);
@@ -1524,7 +1528,11 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
#endif
/* we still miss freeing a lot!,
* but many areas could skip initialization too for anim play */
-
+
+ GPU_shader_free_builtin_shaders();
+
+ immDestroy();
+
BLF_exit();
GHOST_DisposeWindow(g_WS.ghost_system, g_WS.ghost_window);
More information about the Bf-blender-cvs
mailing list