Sign in to follow this  

Problems with slow screen capture

This topic is 4838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey! I am trying to record some movies, so I continuously call glReadPixels every 1/10 sec in my app and write the screen shot on disk. Writing is not the problem. However, the glReadPixels call is terribly slow. Frame rate drops from >200 to 4 in 800x600x32 BPP mode! I've tried many things: - Reduced resolution / bits per pixel / stencil usage. This makes things a bit faster, but still unacceptably slow. Copying 400x300x32BPP = 480KB in 1/10 sec really shouldn't be a bandwidth problem! - Enable/Disabled settings of my GPU like FastWrites (whatever that is), anti-aliasing, anisotropic filtering... No effect. - Changed the pack alignment with glPixelStore. No effect. - Changed the format parameter of glReadPixels to RGB, BGR, RGBA, LUMINANCE and so on. No effect. And now comes the thing that puzzles me the most. Ysaneya recommended me to use FRAPS for taking screenshots or movie sequences. He reported to get 50FPS while recoding a movie. So I tried it and it's as slow as the glReadPixels call. So I'm really puzzled. I've got an Athlon 1.4GHz, ATI RadeOn 9800 Pro 128MB (Omega drivers), 512MB SDRam, Windows 98, Visual Studio 6.

Share this post


Link to post
Share on other sites
glReadPixels is slow because pretty much any framebuffer
readback is going to be slow (to the GPU its like driving on the
wrong side of the road)

here is what i do (for my FrameBuffer Feedback techniques)

render 2 passes:

Screen Pass
- Full detail, User Chooses Resolution

Readback Pass
- LOD degenerate 1
- For multipass, use quick zwrite pass
- Set screen size 320x240
- ALWAYS readback in BGR (esp. on NVidia cards)
- use glCopyTexSubImage2D for Render To Texture -- Not what you want.

Share this post


Link to post
Share on other sites
There is a GDI altarnative to using glReadPixels(), and it's supposed to be much faster. It's described on www.delphi3d.net

Here's the link: http://www.delphi3d.net/forums/viewtopic.php?t=176

PS: The sourcecode is in Delphi... I hope that's not a problem

Share this post


Link to post
Share on other sites
Quote:
Original post by Devilogic
There is a GDI altarnative to using glReadPixels(), and it's supposed to be much faster. It's described on www.delphi3d.net

Here's the link: http://www.delphi3d.net/forums/viewtopic.php?t=176

PS: The sourcecode is in Delphi... I hope that's not a problem


Thanks! I'll definitely try it. I've used Borland Pascal before, so I hope Delphi is not a big problem.

Share this post


Link to post
Share on other sites

This topic is 4838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this