Results 1 to 4 of 4

Thread: Transparent??!

  1. #1

    Transparent??!

    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 ops, 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:

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

    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?

  2. #2

    Transparent??!

    I don't know anything about Powerdraw, but isn't fuchsia clFuchsia, and $FFFFFF(which is clWite)?
    -Sander

  3. #3

    Transparent??!

    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

  4. #4

    Transparent??!

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •