Jump to content
  • Advertisement
Sign in to follow this  
fooman_69

Reading texture data

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

Hiya, If I want to do pixel perfect collision detection, I have to be able to work with the actual data of my textures. Are you able to read pixel data from textures, or am I going about this issue of collision detection wrong?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by fooman_69
Hiya,
If I want to do pixel perfect collision detection, I have to be able to work with the actual data of my textures. Are you able to read pixel data from textures, or am I going about this issue of collision detection wrong?
Check out glGetTexImage. Fetching data from the video card is very slow though, so if you need the texture's image data for collision detection I would advise against glGetTexImage and instead just keep a copy of it in system memory and use that.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!