Usually games render a texture quad (rectangle) with a transparent texture of the flare. Obviously, that quad is always facing the camera. For multiple flares it's the same, but their distributed in a line from the light source to the camera. An example of the first one in WET (quake 3 arena based engine):
Thanks for the tip! It looks like that would be good for a glow effect.
BTW: I don't like lens flares. When playing a first person shooter for example, you usually simulate the world like a human would see it.
It can get annoying. In Star Trek legacy it can be really annoying, but my project isn't a game: more of a demo, test thing.
No human being sees lens flares without looking through a camera, which is not what you usually would do while fighting enemies...
I guess you don't wear glasses, at least not at night. Outside at night, I see lots of lense flare from just about every light source.