View Full Version : the way of grabbing video data rendered by OpenGL other than glReadPixels()

06-21-2003, 04:26 AM
I found the glReadPixels() is very slow in some computer.My program using the function to grab the image rendered by OpenGL every 0.04 seconds,I test it in my Sony GR520 notebook(P4 1.5G+256M+ATI MOBILITY RADEON7200),I found the program hurt the performance of system badly because the CPU usage is still higher than 90%.So does anyone know is there a fast way of grabbing image other than using glReadPixels()?

06-21-2003, 05:59 AM
Look onto the front page (GDI functions, NVidias moviemaker class) ...


06-21-2003, 10:13 AM
The trick to grab the pixels quickly is to grab them using the same format the frame buffer uses.

If the framebuffer is 24 bit color, you need to grab in GL_BGRA, GL_UNSIGNED_BYTE mode. Anything else will result in CPU format conversion.

Even so, it's un-clear how quickly you can grab data from the 7200. If it's on PCI, clearly it'll suck. Even if it's AGP, AGP is optimized for writing, not reading.

06-21-2003, 10:15 AM
I had test the code of moviemaker class,but is also can not solve my problem.I think it was not faster than glReadPixels(),and it has bugs.