Re: How can I get a zoomed image from frame buffer?
by fungus <openglMYSOCKS@[EMAIL PROTECTED]
>
Aug 21, 2008 at 09:33 PM
On Aug 22, 5:07=A0am, Murphy <zishc...@[EMAIL PROTECTED]
> wrote:
> Hi, all
> I meet a problem. I am now using opengl to display a 3d model. For
> certain reason I have to save the pixels of every frame into memory.
> However the cost of glReadPixels is huge. So I want to downsample the
> image and then output it from the buffer. I tried to use glPixelZoom
> and glCopyPixels to zoom and copy the whole screen but it didn't work
> because I don't know where to copy the pixel.
> Anyway, does anyone know a method to output the screen pixels faster
> or have a idea to zoom in the image in frame buffer.
>
a) glReadPixels() from a window only works if the window is on top
of all others. If any part of the window is obscured you'll get
garbage.
Best to render into a pbuffer.
b) A pbuffer can be any size - no need to downsample.
--
<\___/>
/ O O \
\_____/ FTB.
http://www.topaz3d.com/
- Coder-friendly 3D editor