Inochi2D / inochi2d

Inochi2D reference implementation aimed at rendering 2D puppets that can be animated in real-time (using eg. facial capture).
BSD 2-Clause "Simplified" License
1.25k stars 47 forks source link

Reset blend equation in renderScene() #45

Closed gsamudra closed 1 year ago

gsamudra commented 1 year ago

Mesa was throwing a GL_INVALID_OPERATION from the glDrawArrays call further down because an advanced blending mode was still enabled, while the scene fragment shader has no blend_support.

See this test in _mesa_update_valid_to_render_state for the code which detected this condition.

The blending mode was likely last set from inSetBlendMode in source/inochi2d/core/nodes/common.d.

This patch resets the blend equation before drawing the scene.

Fixes Inochi2D/inochi-session#36.

LunaTheFoxgirl commented 1 year ago

Ah yeah that'd explain it, advanced blend equations only work with one destination texture. LGTM, merging