PDA

View Full Version : Reading frames in real time



kcmanuel
06-04-2003, 02:18 AM
Hello,
We need to take the frames of an OpenGL animation and to send them downstream, for example to feed a streaming encoder in order to view the animation in a web page or to send the frames to a professional video board. The problem is glReadPixels() is very slow and we hardly get more than 2 frames per second. The procedure we use is: Render frame, ReadPixels, dispatch the frame.
Can anybody figure out how to improve the frame rate? I have been told about manufacturer specific extensions to make asynchronous glReadPixels calls. Can anybody tell me anything about this approach or about a different one?
Thanks.

AdrianD
06-04-2003, 03:03 AM
download the NVIDIA SDK.
look into OpenGLSDK\src\shared folder. there is a file called "moviemaker.cpp". that's exactly what you are looking for.

jwatte
06-04-2003, 09:20 AM
Make sure you read the EXACT format that the frame buffer is actually running in.

If you use 32-bit frame buffer, this would usually be GL_UNSIGNED_CHAR, GL_BGRA.

Also make sure you align your read buffers reasonably.

Coconut
06-04-2003, 11:31 AM
Do a search on "glReadPixels" in this forum.