Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Scarface5013

how read value of pixel in texture

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

Advertisement
With DirectX 8.x using LPDIRECT3DTEXTURE8:

Lock the texture (or a parts of it) with LockRect(), it will return a pointer to your texture data (in the D3DLOCKED_RECT structure). Now you can do with it whatever you like. Make sure to unlock the texture after your done with it.

----------------------------
"Quotes are cool" - Me

Check out my game Asteroidz, it rules !!!

Share this post


Link to post
Share on other sites
Also, make sure to get the pitch of the image.

You can often end up with screwed up images due to ignoring the pitch.

-Lonely

Share this post


Link to post
Share on other sites

  • 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!