Jump to content
  • Advertisement

Archived

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

EdwardD

Getting a pixel colour from a texture in DX9 ?

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

Anybody know how to get the value of a pixel from a texture in Direct3D, im using C# and DX9 ?

Share this post


Link to post
Share on other sites
Advertisement
Use IDirect3DTexture9::LockRect to lock it and get a pointer to a D3DLOCKED_RECT structure. The pBits member of the D3DLOCKED_RECT is a pointer to the texture data.

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!