Skip to main content
gamedev.net
๐Ÿ”’ Locked

Blend function

Started by ChristophR Aug 24, 2006 at 7:22 AM 1 replies 800+ views
Original Post
ChristophR
ChristophR
Hi! I need to change the blend operation from ADD (it's obviously the default settings) to MIN. Therefore I am looking for an OpenGL function which is equivalent to Direct3D's SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_MIN). Can anybody help me? Thanks in advance! rgds
win_crook
win_crook
I haven't used DX but I think this is what you are looking for.

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Yann L
Yann L
No, what you want is this:

glBlendEquation(GL_MIN);

The default is GL_FUNC_ADD. This function is available from OpenGL 1.2 on upwards. Under Windows, you'll have to use the EXT_blend_minmax extension.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.