For a small 2D mobile game, I'm planning on make the main character texture be decided by player (combine outfit, color, hair,..). First I though in use multiple textures (each with some outfits, hairs,..), load the required and render the character in multiple passes (e.g. front => back hair, body+cloth, head, hair, hair complements, more hair), but as that calls to many times the texture, I don't like this approach.
Instead, I was thinking on doing something similar, but rendering the full character texture (clothes, poses,..) into a framebuffer and use it as a texture (more work than doing it for only the current pose, but only done one time). What I don't know is what is the lifetime of the content of a framebuffer? Does its content remains until the context is deleted, it's cleared at each draw, ..?
Thanks