Hi all,
Just a quick question:
Is there really a need for destination color keying in Direct Draw?
The DieselEngine skipped it (among other stuff), making their engine "kind of" similar to DirectDraw - making it impossible to actually "port" games using it. I personally thinks destination color keying confuses for the end-user and would preferably like to skip it.
/Johan
Destination color keying is handy for blitting to a destination rect that might be covered by objects that are unknown to the application. If a dialog box or menu is drawn over the destination rect, you can continue blitting to the destination surface and not clobber these popups. Yes, it is slower because you have to read and test each destination pixel as you blit. Most apps use a magneta or solid green as the destination color key color for this purpose.
The capability to determine whether this is supported should still be in your DirectDraw clone API. Your driver can always report back that it doesn't support it via the DDCKEYCAPS_DESTBLT caps flag.
Hi Digby!
Ok. Hmm. I guess I'll sleep on it. I feel that lots of the stuff with DirectDraw is totally overkill when we are dealing with Pocket PCs, and this was one of them. There are also several features missing in DirectDraw (on WCE DirectDraw5 you have RotationAngle, but not RotationScale for example), which have to be added. Either way a 1:1 match of DirectDraw is easily implemented, the question is more why one would want it?
My current aim is more of a "provide the fastest DirectDraw-implementation for current devices, and enable easy transition to the real thing once it gets there".. If it ever gets there, having the transition from DirectX 7-8 in mind. Now all game developers have to use 3D.. This is also one of the aspects that I am leaning towards a not exact 1:1 copy of DirectDraw.
Also.. What do you think of color formats? Is it ok to use SetColorKey(flags, COLORREF color). Or should one really have to go the full way with a structure?
Thanks for your comments,
Best regards
Johan
I don't think you need to implement some of the more esoteric features of DDraw for your Pocket PC version, but you really don't have to. Just return the caps bit that says your "driver" doesn't support it. Apps using DDraw have had to deal with that forever.
From what I remember the SetColorKey API takes a structure that allows you to specify a color range. If the driver doesn't support color ranges, most apps set both the upper and the lower range to the same value.