Sign in to follow this  
farazfo

get memory image from DXSurface

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this