I need to draw several "layers" of bitmaps that are semi-transparent to a FBO (for later readback).
My current approach is to create a FBO, attach a texture to it and use glTexSubImage2D to "draw" the bitmaps to the FBO, this however, doesn't work as glTexSubImage2D doesn't draw/blend the pixels, but just overwrite the pixels currently in the texture.
What's the best way to do this?
GL_BLEND
enabled and properly set up.The final result is that R holds your blended bitmaps. You can now read it back or use in other texturing operations.