On Aug 22, 12:33=A0pm, fungus <openglMYSO...@[EMAIL PROTECTED]
> wrote:
> 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 \
> \_____/ =A0FTB.
>
> http://www.topaz3d.com/=A0-
Coder-friendly 3D editor
Thank you for your reply. I am a new guy of opengl, so I didn't know
pbuffer before. I will check it out. However, something I missed to
say is that beside the image pixels I also want to get the depth
image, so can you tell me if the pbuffer can get the depth image?
thanks again.


|