Quote Originally Posted by Alimonster
This post assumes that you're referring to DirectDraw and not Direct3d.

You have to blend surfaces by hand in DirectDraw, which means locking and going over the pixels. You'd read the pixels, break them up into r,g, and b components, do some calculations on them, then recombine the results. This ain't the fastest thing out there. You will get more speed with MMX, so try having a look at this article at Gamedev (note: it's in C++ - if that's a problem, let me know): MMX Enhanced Blending. There may be other blending articles at gamdev; I forget.

As for calculating the offsets... have a look at the pixel manipulation part of my yet-to-be-finished DDraw tutorial: http://www.alistairkeys.co.uk/ddraw2.shtml (Btw: the layout may screw up in IE 5 due to its broken box model implementation -- if so, upgrade to a less broken browser such as IE 6 or Mozilla).
Thanks very much for those I tried the simple 50% blending routine and it works fine (tested with TBitmap) I think it will be too slow though to keep it for what I have in mind Will have to try coding that MMX example on the same page... Bah, there looks to be loads of code in the MMX routine, seems hard to believe it could be more efficient than that one line of code for simple 50/50 blend. Will check out your site now as this pixel offset is driving me nuts.

Is there any way of stopping my PC locking due to the Win16Mutex crap?