[OpenGL] Best approach to setting every pixel's color
I'm working on a 2D surface, where n kinds of lighting spheres move along with my mouse. Every pixel's color got to be calculated per movement, since it is obtained by the distance between the pixel and all of the sphere's centers. This way, I have n * width * height calculations per frame, and that's a lot of work when trying to reach 60 fps with a 1024x768 resolution and with n = 3 or so.
I want to know the fastest (doesn't mean the easiest) way to do such thing in OpenGL.