Sign in to follow this  
all_names_taken

OpenGL Getting GPU texture data to CPU

Recommended Posts

I'm using glTexSubImage2D a lot to update a texture in a component. For testing purposes, it would be quite handy to be able to retrieve the texture data from the GPU to perform checks at any time that the data loaded into it is correct. Is there any way of doing this in OpenGL?

Share this post


Link to post
Share on other sites
Take a look at the OpenGL reference pages.
Unfortunately it seems you can only retrieve the whole texture and not just a part of it. A workaround would be to render the texture to the framebuffer or bind it to a framebuffer object, set the read buffer correctly and then read it with glReadPixels.

Share this post


Link to post
Share on other sites
It better to use GLintercept for debugging. If you have any questions on how to use, ask away.

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