Page 1 of 1

RGBA surfaces and GetBuffer

PostPosted: Oct 14, 2003 @ 8:36am
by efortier

PostPosted: Oct 14, 2003 @ 9:58am
by Johan

PostPosted: Oct 14, 2003 @ 7:43pm
by efortier
Thanks!

So I just need to do this to retrieve the color:

DWORD *Buffer = (DWORD *) BufferDesc.pBuffer;

then add the proper pitches to Buffer and retrieve the color like this:

COLORREF Color = Buffer[whatever] & 0x00ffffff;

--Eric

PostPosted: Oct 14, 2003 @ 7:47pm
by efortier
Update: I must use xPitch >> 2 to get the number of DWORD to add for each x increment, right?

--Eric

PostPosted: Oct 15, 2003 @ 9:19am
by Johan