Jump to content
  • Advertisement
Sign in to follow this  
worldtiki

glreadpixels in real time

This topic is 4893 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

I'm using glreadpixels to analyze an image in real time, but this function is kinda sluggish. Is there any way to access the graphical memory directly? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
There seems to be no good method to get an image from GPU back to CPU fast.
At least I don't know any.

However, you could "analyze" your image by copying it into a texture with glCopyTexSubImage2d and then use this texture in a fragment program. This way, it's for example possible to apply a Laplace filter or a convolution filter.

Share this post


Link to post
Share on other sites
you can make sure you allow readpixels to work as fast as possible by making sure the format you request the data in is the same as the backbuffer, but as long as you readpixels more than - say, 128x128 - you'll most likely be bound by agp-reads. (unless, ofcourse, you're the lucky owner of a pci express-card... or the unlucky owner of some pci-card ;P)

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!