Edward Moser
Edward Moser

Reputation: 21

Using multiple blendfunc OpenGL

I want to use

glBlendFunc(GL_ONE, GL_ONE) 

and

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) 

at the same time. Is this possible?

Upvotes: 1

Views: 903

Answers (1)

Mark Ingram
Mark Ingram

Reputation: 73713

You can create an offscreen Framebuffer Object with a texture attached to it. Perform the first render using glBlendFunc(GL_ONE, GL_ONE) then flip the input and output textures and perform the second render using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).

Upvotes: 3

Related Questions