diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-10-22 02:19:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-10-22 02:19:10 +0300 |
commit | cc3fdffbbe450ef75a49571ec75fd8f0ecb45550 (patch) | |
tree | fdc1875ca6226a47914bc5102cbaa9e5d3ca7a82 /source/blender | |
parent | 5a65305f8998a72c8bf39bc69414c7ba2da57055 (diff) |
DRW: Fix custom engine not being BGL safe
This was caused by unprotected drawing callbacks.
As of 2.91, we require that all python callbacks used for
drawing needs to be safeguarded by `GPU_bgl_end()` to end the
state tracking override.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/external/external_engine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c index bcdd0f9e3dc..bd97fd8a413 100644 --- a/source/blender/draw/engines/external/external_engine.c +++ b/source/blender/draw/engines/external/external_engine.c @@ -36,6 +36,7 @@ #include "GPU_matrix.h" #include "GPU_shader.h" +#include "GPU_state.h" #include "GPU_viewport.h" #include "external_engine.h" /* own include */ @@ -243,6 +244,8 @@ static void external_draw_scene_do(void *vedata) type = rv3d->render_engine->type; type->view_draw(rv3d->render_engine, draw_ctx->evil_C, draw_ctx->depsgraph); + GPU_bgl_end(); + GPU_matrix_pop(); GPU_matrix_pop_projection(); |