DirectX Colorkey transparencies
I'm currently trying to make an isometric game engine in Visual Basic using DirectDraw 7 for the graphics.
To make a sprite transparent, the colorkey is defined in this way. This makes any parts of the image that are black appear transparent when blitted.
Code:
Dim key As DDCOLORKEY
key.low = 0
key.high = 0
spritesurf.SetColorKey DDCKEY_SRCBLT, key
I however, rather like the color black and would rather have the transparent color be the wretched bright green RGB(0,255,0) or even better yet, I would prefer the transparent color to be determined by the upper left hand corner pixel in the sprite. I can't seem to figure out how to set the keycolor to that green though and any attempts at that other automated trick have failed horribly.
Has anyone ever done something like this with DirectDraw 7? If you have, could you please give me some insight into the matter.
~Stoinker~