BGL: Workaround broken bgl usage caused by GPU refactor

This directly adress the issues caused by rB536c2e0ec916.

Since the state tracking is done at a lower level, using the bgl
functions needs to be safegarded by the state manager.
The current workaround is to bypass `apply_state` when inside a
callback that used a `bgl` function.

Related to T80730.

This fix T81003.

Also this fix the default blend equation for callbacks.
Fixes T80169 T81289.
This commit is contained in:
2020-10-08 16:19:42 +02:00
parent 5f364216ac
commit f12b0373f3
7 changed files with 50 additions and 10 deletions

View File

@@ -200,7 +200,7 @@ void check_gl_error(const char *info)
void check_gl_resources(const char *info)
{
if (!(G.debug & G_DEBUG_GPU)) {
if (!(G.debug & G_DEBUG_GPU) || GPU_bgl_get()) {
return;
}