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.
This commit is contained in:
parent
5a65305f89
commit
cc3fdffbbe
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue