I asked in #allegro the other day, and despite getting an answer from Bob, it's still not working right. I need to figure out how to do multiply blending in OpenGL so I can properly overlay a lightmap on a polygon. Yeah I know I should use multitexturing, but besides wanting to support cards that may not have it (I don't think mine does), the engine is already setup to do a double-pass for lighting. When I asked on IRC, I was told:
glBlendFunc(GL_DST_COLOR, GL_ZERO);however that didn't work. Doing this, however:
glBlendFunc(GL_ZERO, GL_DST_COLOR);somewhat works, but not fully. That just applies the lightmap's color to the polygon, but doesn't actually do the lighting (eg. it doesn't darken anything, just colorizes).
Grepping around the gl headers for multiply, google searches for opengl multiply blending, and forum searches for the same have turned up nothing. Can someone tell me what I'm doing wrong?