Im no programming expert but i have dabbeld in OpenGL for a wile and modding.

Just my 2c.

The code looks ok, but what might be the problem is that its going through that to fast, so you dont see whats on the screen. I reccomend using a timing system to smoothly update the effect on screen over x amount of time.

---Brandon