You're probably close, but theres a couple changes I would make:
#1) I don't think you ever need to call glFlush. The driver should keep track of what is dependent on what else, so you won't be able to pull from a texture or framebuffer until its ready.
#2) Instead of rendering your scene normally and then copying the texels to a texture, you can render directly into a texture via framebuffers. Look into the commands:
glGenFramebuffers
glBindFramebuffer
glFramebufferTexture
This should be a lot more efficient.
#3) When you render the fullscreen quad, you definately don't want to use the same projection matrix. The easiest is to just use no matrix at all (define input coordinates in normalized device coordinates). Just draw your quad with vertices (+/-1, +/-1, 0) and that will align with the fullscreen without any transform required.
Ok, I'll give [s]that[/s] framebuffers a shot at some point, but I'm not very concerned with efficiency at this point, just want to get it working
I've read about framebuffers though and it does seem like they are often used for this purpose, and if it makes it easier I'm all for it.
As I was re-reading my post this morning, I think I either made a mistake in my explanation above (and probably my implementation, but I'm at work so can't check my code right now), or I REALLY don't understand how the OpenGL pipeline works.
I think I need to swap steps 1 and 4 of the render portion, i.e. I need to render my normal frame WITHOUT my shaders first, then capture the screen as a texture, enable my blur shader and re-render, then map that to a quad. Otherwise, it doesn't seem to make sense to me (i.e., it seems like the only reason we need the texture is to pass the data in to the shader, since a blur shader needs to know about surrounding pixel data, and the fragment shader otherwise doesn't know about surrounding fragments...please correct me if I'm wrong about this though).
Also, I'm currently using an Orthographic projection (I'm building a Geometry Wars clone just to learn game programming so it's 2D), so would I still need to alter my projection matrix? I think I should easily be able to use my current projection matrix, but I could be wrong about this as well (all the example code for 3D does this by setting it back to normal I believe and using 0,1 (or -1,1, can never keep it straight...), but I was thinking I could skip this step since I already have an orthographic projection.
Thanks for your reply! I'll try swapping steps 1 and 4 of the render piece later when I get back, and if that doesn't work I'll try to come up with some example code to show the problem I'm having.