Eraser in OpenGL ES iphone

I have two images that overlap each other (the way the cards are stacked on top of each other)

Now, if I move my finger along the topmost image so that part of the image becomes transparent (the opacity of this part should be 0).

I am new to OpenGL ES development.

kindly help me or give me any suggestion to complete this function.

Thanks in advance

+3
source share
2 answers

Framebuffer (FBOs). Render , -, glColorMask ( , ), -, - 0.0, .

+1

- , GLBlending:

if (eraseMode) {
    glBlendFunc(1.0,0.0);
}
else {
    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}

- , , .

0

Source: https://habr.com/ru/post/1758712/


All Articles