Open waqas19921 opened 7 years ago
You can create an instance of BlendFunc by your self.
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
Why it has 4 parameters?
i want to user glBlendFuncSeparate
how to use that with above params in triangle command.
@minggo i didn't understand your suggestion
calling glBlendFuncSeparate()
does not effect at all.
you have provided setBlendFunc()
with two parameters for sprite but it should also have an glBlendFuncSeparate()
with four parameters so that one can set different blending modes for colors and alpha channels.
i have used
where
BlendFunc::ALPHA_PREMULTIPLIED
is equivalent toglBlendFuncSeparate(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
but how can i achieve this
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);