Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2017-04-06 07:54:10 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2017-04-06 07:54:10 +0300
commitff3880ff93f492e68a5923db4bb32b2c0b189cae (patch)
tree37a1c1bfca1b3028c072c4db37c60333188e8f97 /source/blender/windowmanager/intern/wm_playanim.c
parent9f72580d0784b2bf55743ab44d5f95039f282b5e (diff)
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
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c10
1 files changed, 9 insertions, 1 deletions
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);