void ofApp::setup()
{
image.load("img.jpg");
fbo.allocate(image.getWidth(), image.getHeight(), GL_RGBA,4); //GL_LUMINANCE depends on your GL version
fbo.begin();
ofClear(0,0);
ofDrawEllipse(100, 100, 200, 200);
fbo.end();
// Do the trick
image.getTexture().setAlphaMask(fbo.getTexture());
}
void ofApp:draw() {
image.draw(0, 0);
}