• Advertisement
Sign in to follow this  

get memory image from DXSurface

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

hi I'm new with direct x so please easy answers please :p I want to convert DXSurface to an memory image in directx (rather using c#) so that I could make some image processing on that if someone tell me how to access every pixel of an DXSurface (I mean the ARGB code) that would be cool too thank U...

Share this post


Link to post
Share on other sites
Advertisement
What language / API, and do you really mean a surface, or are you using textures?
This is usually done by locking the surface (IDirect3DSurface9::LockRect in C++ / DX9), which will give you a pointer to the memory containing the surface data. The format of the data you get back depends on the format of the surface however, so if you gave a 16-bit surface, you'll only get 16-bit data back from locking it and you'll need to convert that to 32-bits if you need to.

Share this post


Link to post
Share on other sites
i think that's exactly what i wanted
thank you so much
I'll work on it and ask any further questions
:) thank you again

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement