Generating MipMaps after glCopyTexImage2D( )

I want to blur my scene by copying the color buffer to texture, bluring the texture and drawing it on quad.
I’m thinking to use one of the mipmap level (i.e. 2), in order to force the GPU to do linear magnification (on smaller copy of the texture) - and blur it.

(I know there are other ways to it (maybe even better), but I need to do it in this way)

My question is how I can generate mipmaps on texture that is in the GPU memory (after glCopyTexImage2D( )).


There’s also a GL_GENERATE_MIPMAP texture parameter you can set, but I’ll let those that have actually researched this tell you which one is the right way.

Also, if ATI support is a concern, search the archives. Seems like there was some strangeness getting MIPmap gen to work on ATI within the last year.

glGenerateMipmap() works for me on ATI without problems.
Though, I’m aware of numerous problems discussed on this forum.
It can be that latest drivers fix most of the issues happened before.

GL_GENERATE_MIPMAP is now deprecated (GL 3.1+), so you don’t have much of a choice.

It works!!!

thank’s a lot