Sign in to follow this  
worldtiki

glreadpixels in real time

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
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

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