Fancy frame post processing

I found a new toy! Frame post processing!

http://www.mojang.com/~markus/realtimeblur.jpg

To achieve that effect, I grabbed the frame buffer after rendering it normally

gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1024, 768);

Then I rendered it back again onto the screen eight times with blending set to gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

(naturally, I set up an orthogonal projection first)

for (int i = 0; i < 8; i++)
{
    float a = 1 - (i / 8f);

    gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_BASE_LEVEL, i + 1);

    gl.glBegin(GL.GL_TRIANGLE_FAN);
    {
        gl.glColor4f(1.0f, 1.0f, 1.0f, 0);

        gl.glTexCoord2f((1024f / 2) / 1024f, (768f / 2) / 1024f);
        gl.glVertex2f(1024f / 2, 768f / 2);

        gl.glColor4f(1.0f, 1.0f, 1.0f, a);

        gl.glTexCoord2f(0, 0);
        gl.glVertex2f(0, 768);

        gl.glTexCoord2f(1024f / 1024f, 0);
        gl.glVertex2f(1024, 768);

        gl.glTexCoord2f(1024f / 1024f, 768f / 1024f);
        gl.glVertex2f(1024, 0);

        gl.glTexCoord2f(0, 768f / 1024f);
        gl.glVertex2f(0, 0);

        gl.glTexCoord2f(0, 0);
        gl.glVertex2f(0, 768);
    }
    gl.glEnd();
}

That renders a TRIANGLE_FAN with the center in the middle of the screen for each mip map level from 1 to 8.
The vertex in the middle has alpha set to 0, and the vertices on the edges of the screen get alpha a. a is based on the mip map level to make sure it gets blurred as smoothly as possible. (you can try other ways of chosing a for other nifty results)

This thing just blurs the screen based on the distance from the center of the screen, but you can do all kinds of glow and blur relatively fast this way.

Looks cool!!!

Could you post your complete code, please?