Original Post
until now, i never needed to manage my surfaces at the pixel level, i used to just call LoadImage() or something and play around with the DCs just like in DDLoadBitmap(), but now the time comes, and i have to plot pixel by pixel to the surface. Unfortunately, i can''t seem to make any sense out of the surface format, so i''m going to make my question a broad one:
Assume i have an array:
char p[50][50][3]
which holds a 50x50 bitmap with a 24bit depth. and now assume i have a DDraw surface which is 50x50 and is 24bits deep. I''ve locked it and eveyrthing, the surface data is stored in DDSURFACEDESC2 ddsd, and i have typecast pointer tothe surfacedata: char* = (char*)ddsd.lpSurface. How would i copy this bitmap onto the surface? I have read the document many times nad found it very vague, i saw something about the pitch must be multipleof a DWORD or something, and some otherweird stuff which just confuses me, also, the pitch in ddsd syasits 192, why is that? And one last slightly offtopic question: how do i create a surface specifiying the bit depth?
Thanks in advance
The WymsicalWyvern
Assume i have an array:
char p[50][50][3]
which holds a 50x50 bitmap with a 24bit depth. and now assume i have a DDraw surface which is 50x50 and is 24bits deep. I''ve locked it and eveyrthing, the surface data is stored in DDSURFACEDESC2 ddsd, and i have typecast pointer tothe surfacedata: char* = (char*)ddsd.lpSurface. How would i copy this bitmap onto the surface? I have read the document many times nad found it very vague, i saw something about the pitch must be multipleof a DWORD or something, and some otherweird stuff which just confuses me, also, the pitch in ddsd syasits 192, why is that? And one last slightly offtopic question: how do i create a surface specifiying the bit depth?
Thanks in advance
The WymsicalWyvern