I want to implement two effects at the same time, the first effect need to clear the background every frame,but the second effect don’t need to clear background, so there is collision here. How can I solve this problem? Can I draw in different layers in Openframeworks? Thank you!
you need to use FBOs. They are containers for textures where you can draw any content. then you can draw the FBO on screen.
draw each effect into different FBOs.
Mind that basically FBO is not cleared each frame so call ofClear() to clear it if needed