need help with locking dd surf

Started by
-1 comments, last by octavsoft 22 years, 10 months ago
When I lock a dd surface, how can I get to pixel (x,y)?? Let''s say that I lock rectangle rc, and in ddsd I have the surface description. What''s the formula to get to the memory for pixel (x,y), relative to the upper-left corner of rc. The bpp is 16bits. I tried: *(WORD*)((BYTE*)ddsd.lpSurface+y*ddsd.lPitch+x*2) but i get something weird. Please help me, someone. Octavian E-mail: octav@octavsoft.com Webpage: http://www.octavsoft.com
OctavianE-mail: [email=octav@octavsoft.com]octav@octavsoft.com[/email]Webpage: http://www.octavsoft.com

This topic is closed to new replies.

Advertisement