Overv
Overv

Reputation: 8529

Fast capturing of OpenGL framebuffer?

I'm wondering how FRAPS captures the OpenGL framebuffer, because it seems to perform a lot better than repeated calls to glReadPixels (even when nothing is saved).

I have a simple OpenGL demo that looks like this:

http://puu.sh/Gat5

I know how meaningless framerates are compared to actual frame time in milliseconds, but I'm going to use it for a simple comparison here.

When running normally, I get an average frame rate of well over 8000.

When recording with FRAPS locked to 60 fps at full-size, the framerate lowers to 240.

When calling glReadPixels and doing nothing otherwise, the framerate is 225.

How does FRAPS manage to record and save the output in a reasonable amount of time? Does it use a recording thread using a very light encoding format?

Upvotes: 2

Views: 2376

Answers (1)

Overv
Overv

Reputation: 8529

As Ben Voigt has stated, the slowdown is much less apparent when only capturing (i.e. calling glReadPixels) 30 or 60 frames per second.

Upvotes: 1

Related Questions