Jump to content
  • Advertisement
Sign in to follow this  
Lutz

Problems with slow screen capture

This topic is 5058 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!