• Advertisement
Sign in to follow this  

reading a subimage back from texture

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

Is there a way to read a subimage from a stored texture? My google-fu has failed me. All I can find is that you need to read the entire texture back which is really slooooow.

Share this post


Link to post
Share on other sites
Advertisement
Have you tried copying the subimage from the stored texture into a smaller texture? Maybe it would work roughly like this: 1) Create a new texture the size of your subimage, 2) Attach this texture to a FBO for render-to-texture functionality, 3) Setup ortographic projection, 4) Draw the part of the stored texture you're interested in reading back, 5) Disable the FBO and switch back to perspective projection, 6) Read back the new texture with glGetTexImage.

Share this post


Link to post
Share on other sites
If it a standard texture, then no, there is no "sub image readback".
If it is a render to texture, then attach the FBO, use glReadPixels.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement