How do I make a copy of a CGapiRGBASurface? With a CGapiSurface I just created a new surface and then used BltFast.
Good question. Actually it's not that simple.. I'll add it to my "make easy" list. To make an exact copy you would have to call GetBuffer() on both surfaces, and then copy each RGBA value individually, like:
DWORD* pSrc = srcBuffer;
DWORD* pDest = destBuffer;
while (each line)
{
while (each column)
{
*pSrc = *pDest;
pSrc += srcXPitch;
pSrc += dstXPitch;
}
pSrc += srcYPitch;
pSrc += dstYPitch;
}
Don't forget to adjust the pitch value (srcPitch = (xPitch >> 4)).... I'll see if I can make all this easier in the next release...
//Johan