From the SRD:
Sneak Attack: If a rogue can catch an opponent when he is unable to defend himself effectively from her attack, she can strike a vital spot for extra damage.
The rogue’s attack deals extra damage any time her target would be denied a Dexterity bonus to AC (whether the target actually has a Dexterity bonus or not), or when the rogue flanks her target.
So, the rogue could get all of her attacks as sneak attacks provided the defender is denied their dex bonus. This could happen from a successful feint, being flat-footed because the defender has not had his first action due to a low initiative roll, or because the rogue is invisible or hidden. Now, once the hidden or invisible rogue attacks, she becomes visible to the defender. However, while the defender is still denied his dex bonus, the rogue is making all attacks as sneak attacks. Visible or not.