PDA

View Full Version : reading framebuffer in real time



wolf
10-17-2002, 04:41 PM
Hi -

Does anyone have a suggestion on how one might read pixels from the framebuffer during a realtime simulation?* When i merely read the pixels, my simulation slows down more that an order of magnitude!* Is there some more efficient way to accomplish this (i am using glReadPixels currently)?* Or perhaps a hardware solution?

TIA.

ken

heath
10-17-2002, 07:25 PM
depending upon your requirements glCopyTexImage2D will be significantly faster since the destination is texture memory, rather than RAM. This may not fit your requirements however. Take a look at the red book for further information, along with the various derivative commands.

Heath.

Mazy
10-18-2002, 06:20 AM
First, ask yourself if you really need to access the pixeldata via the CPU, many times that's not needed, and you can use the Copy command mentioned above. if you still need to let the CPU access the pixeldata, then ask yourself if you need the screen resolution, or if you can render the 'scene' on a smaller area first, copy that to memory and then render the 'scene' in fullscreen.. it's usually much faster to render 2times than copy the full screen to sys-mem

/M

LarsMiddendorf
10-18-2002, 06:45 AM
Look at the nv_pixel_data_range extension. It is similar to nv_vertex_array_range and allows fast reading and writing of pixels, but this extension is GeForce only.