PDA

View Full Version : glCopyTexImage2D and glPixelZoom



mogumbo
03-22-2008, 03:17 PM
I'm trying to copy my depth buffer to a FBO depth texture, shrinking it at the same time, so that I can rerender my glowing objects and blur it to make a nice glow texture.

The glCopyTexImage2D man page says "The pixels in the rectangle are processed exactly as if glCopyPixels had been called..." And when using glCopyPixels, you can also use glPixelZoom. But glPixelZoom does not appear to work with glCopyTexImage2D.

Am I wasting my time trying to make this work, or should it be possible? As far as the OpenGL docs are concerned, it looks like it should be possible.

-NiCo-
03-22-2008, 04:58 PM
According to this (http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html) glPixelZoom only works with glDrawPixels and glCopyPixels.

Maybe blitting (http://www.opengl.org/registry/specs/EXT/framebuffer_blit.txt) is a better way to go about this.

mogumbo
03-26-2008, 07:55 PM
Thanks NiCo. That sounds like exactly the right solution. Unfortunately, everything I can find on the web makes it sound like support for EXT_framebuffer_blit is still pretty sketchy, particularly on ATI. I think I go for something more low-tech right now and check on this extension a while later...