• Advertisement
Sign in to follow this  

Image Copying

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

Could someone provide some sample code which demonstartes how to copy pixel data onto a standard Direct3D surface. When I say pixel data, I mean the kind of pixel data you'd usually pass to a GDI function like SetDIBitsToDevice (as lpvbits param). Essentially, therefore, I have an array of DIB bits, and I want to copy it onto a Direct3D Surface. Thanks. [Edited by - DX_GAMEDEV_2004 on November 9, 2004 6:58:57 AM]

Share this post


Link to post
Share on other sites
Advertisement
For the thousandth time: [smile]

-Lock the surface. This obtains you a pointer and scanline pitch of the surface.
-Using the pointer, copy your data in the surface.
-Unlock the surface.
-Use it as usual.

This is a very frequently asked question, hence the first remark ;)

Kind regards,
-Nik

Share this post


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

  • Advertisement