• Advertisement
Sign in to follow this  

glBlendFunc

This topic is 418 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

how to reset glBlendFunc?. I thought to reset that with push popmatrix?

Many thanks

Edited by mike44

Share this post


Link to post
Share on other sites
Advertisement

Use ::glDisable( GL_BLEND ) to disable it.
Use ::glBlendFunc( GL_ONE, GL_ZERO ) to set it back to the OpenGL default.


L. Spiro

Edited by L. Spiro

Share this post


Link to post
Share on other sites

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBlendFunc.xhtml

The default blend state is blending disabled and src GL_ONE, dst GL_ZERO.

However, I would recommend that you not reset the blendfunc (or indeed any other state) after drawing.  Instead you should explicitly set all of the state you want before drawing.  Add state filtering if performance bothers you.  This way your draw calls get to be more robust by not having dependencies on or assumptions about previously set state.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement