GRAPHICS: Add support for pixels with masks and inverted pixels

This commit is contained in:
elasota 2023-02-05 17:42:03 -05:00 committed by Eugene Sandulenko
parent 8adcc29df9
commit 3db67a33ac
36 changed files with 449 additions and 91 deletions

View file

@ -119,6 +119,14 @@ void Framebuffer::applyBlendState() {
GL_CALL(glEnable(GL_BLEND));
GL_CALL(glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
break;
case kBlendModeAdditive:
GL_CALL(glEnable(GL_BLEND));
GL_CALL(glBlendFunc(GL_ONE, GL_ONE));
break;
case kBlendModeMaskAlphaAndInvertByColor:
GL_CALL(glEnable(GL_BLEND));
GL_CALL(glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA));
break;
default:
break;
}