reading #20 tutorial on Nehe and a question here about masking, I implemented masking using b/w image and opaque image, however the result is completely not what is expected (I'm using OpenGL ES 1 on iPhone, so can't use shaders).
Source+Mask=Result
As can be seen on the result picture what is white on mask isn't transparent and what is black isn't source color, but white (!)
Here is the source code I use to render it:
// we render from one big texture using coordinates
// so changing rectangle will change the drawn image
_pressedFrame = maskRect;
glBlendFunc(GL_DST_COLOR,GL_ZERO);
[super render:sender];
_pressedFrame = normalRect;
glBlendFunc(GL_ONE,GL_ONE);
[super render:sender];
Спасибо за любую помощь!