[HOpenGL] GL_BLEND

Glynn Clements glynn.clements at virgin.net
Mon Oct 11 06:34:01 EDT 2004


Sven Panne wrote:

> > I am not completely sure, but it looks like the binding groups
> > the enabling of basic blending and the specification of extended blending
> > equations together.
> > So that if you wanted to enable blending, you would do
> > 
> > blendEquation $= Just FuncAdd
> > 
> > and calling
> > 
> > blendEquation $= Nothing
> > 
> > to disable it.
> 
> Yep, that's correct. If setting part of the OpenGL state is cheap (like
> glBlendEquation), the Haskell binding combines this with the corresponding
> glEnable/glDisable call using the Maybe type. This is much cleaner IMHO
> and normally doesn't have any measurable performance impact. If it does,
> you should better take some care to minimize state changes, anyway... :-)

Does this rely upon the underlying OpenGL implementation/driver
supporting glBlendEquation() (i.e. OpenGL 1.3 or 1.2+GL_ARB_imaging)?

-- 
Glynn Clements <glynn.clements at virgin.net>


More information about the HOpenGL mailing list