Jump to content
  • Advertisement
Sign in to follow this  
kelley

OpenGL read from texture

This topic is 4381 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 back data from a texture in video memory? I know how do it in Direct3D (for example, using D3DXSaveTextureToFileInMemory()), but I was wondering if there was a way to do it in OpenGL. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by kelley
Is there a way to read back data from a texture in video memory? I know how do it in Direct3D (for example, using D3DXSaveTextureToFileInMemory()), but I was wondering if there was a way to do it in OpenGL.

Thanks!


Most the time you'll be dealing with Bitmap Data in memory when you're manipulating graphics, if not directly compressed TGA and/or JPEG, but mostly Bitmap Bits for handling the pixels.

That's if you mean is it possible to read data stored in memory the answer's yes.

Normally you don't focus on that stuff though as hardware usually handles it in the background, using the functions for accessing this data is the exact opposite of loading it, but you've got to load it to display it anyways so you should have either a graphics handle/pointer, or method to the memory address where the pixel data's stored, or object.

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!