Re: GL_BLEND

Glynn Clements <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.