View Full Version : Transparent??!

31-05-2003, 08:59 PM
Ok I've been trying for atleast an hour now and I can't get it to work (nor find a bug, not skilled enough ;)). How do I get my stupid image drawn transparent with clFuchsia being the transparent color and everything else showing up fine?

This is what I have done:

In the VTD manager, I added my simple image (programmer art :oops:), the image is only 24x24 (will be a cursor) and I set the transparent color to $FF00FF which is the default. Pressed ok.

After loading my image I am using this in my OnRender:

PowerDraw.TextureMap(ResourceKeeper.ImageList.Imag es[ResourceKeeper.Cursor1],
pBounds4(Mouse.X, Mouse.Y, 24, 24), cColor1($FFFFFF), tPattern(0), 0);

ResourceKeeper is a helperclass, (which I still have to optimize a bit; a different variable per image doesnt work really :roll:) and Cursor1 contains the index I acquired in the OnLoad. I have been playing with all the properties, and every time I see my arrow... but I keep see the fuchsia as well... What am I doing wrong?

03-06-2003, 05:49 PM
I don't know anything about Powerdraw, but isn't fuchsia clFuchsia, and $FFFFFF(which is clWite)????

03-06-2003, 06:57 PM
Powerdraw uses an array of colors for the D3D functions, which also adds alot of options. Changing that value seems only to affect the effect I am using :(

04-06-2003, 09:11 PM
There're PowerDraw examples that demonstrate how to render transparent images. You need to render with effectSrcAlpha effect and your image should have Alpha-channel. VTDTool can create alpha-channel for you, when you load image and specify the transparent color.