Jump to content
  • Advertisement
Sign in to follow this  
all_names_taken

OpenGL Getting GPU texture data to CPU

This topic is 3847 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 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
Advertisement
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
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!