how read value of pixel in texture
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 !!!
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 !!!
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
You can often end up with screwed up images due to ignoring the pitch.
-Lonely
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement