Fix T80842 Grease Pencil: Subtract mode is not working as expected

The blend equation was not set correctly inside the GL Module
since the refactor.
This commit is contained in:
Clément Foucault 2020-11-05 14:12:02 +01:00
parent 4988f5f39c
commit 15eec7f8b9

@ -437,6 +437,13 @@ void GLStateManager::set_blend(const eGPUBlend value)
}
}
if (value == GPU_BLEND_SUBTRACT) {
glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
}
else {
glBlendEquation(GL_FUNC_ADD);
}
/* Always set the blend function. This avoid a rendering error when blending is disabled but
* GPU_BLEND_CUSTOM was used just before and the frame-buffer is using more than 1 color target.
*/