Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I want to use blending but can t get destination alpha to work. Can I blend or create a transparency effect without destination alpha?

0
Posted

I want to use blending but can t get destination alpha to work. Can I blend or create a transparency effect without destination alpha?

0

Many OpenGL devices don’t support destination alpha. In particular, the OpenGL 1.1 software rendering libraries from Microsoft don’t support it. The OpenGL specification doesn’t require it. If you have a system that supports destination alpha, using it is a simple matter of asking for it when you create your window. For example, pass GLUT_ALPHA to glutInitDisplayMode(), then set up a blending function that uses destination alpha, such as: glBlendFunc(GL_ONE_MINUS_DST_ALPHA,GL_DST_ALPHA); Often this question is asked under the mistaken assumption that destination alpha is required to do blending. It’s not. You can use blending in many ways to obtain a transparency effect that uses source alpha instead of destination alpha. The fact that you might be on a platform without destination alpha shouldn’t prevent you from obtaining a transparency effect. See the OpenGL Programming Guide chapter 6 for ways to use blending to achieve transparency.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123