Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Direct3D Surface Transparency.

Beast96GTBeast96GT Member Posts: 13
Hello, I'm trying to figure out how to get my little sprite background to be transparent.

I'm loading up 2 surfaces with LoadSurfaceFromFile().
I then paint the backbuffer with the background one with CopyRects()
and then paint the little sprite. I set the colorkey with black (also tried pink) on the sprite, but it STILL always draws the box around the sprite.

GameTutorials transparency is very unclear and is on textures, not surfaces. Does the alphablending not work on a surface?? Thanks.

Chris

Comments

  • GaashiusGaashius Member Posts: 349
    : Hello, I'm trying to figure out how to get my little sprite background to be transparent.
    :
    : I'm loading up 2 surfaces with LoadSurfaceFromFile().
    : I then paint the backbuffer with the background one with CopyRects()
    : and then paint the little sprite. I set the colorkey with black (also tried pink) on the sprite, but it STILL always draws the box around the sprite.
    :
    : GameTutorials transparency is very unclear and is on textures, not surfaces. Does the alphablending not work on a surface?? Thanks.
    :
    : Chris
    :
    I think the problem there is that the background of the sprite is not precisely "black", I mean $000000. It can also be $010200 or $000103, or something else...Try to pick the color of the sprite's background, then use it as a keycolor. I don't know is there something about picking colors, but I have fixed a same problem. I really hope it will work here too.

    (My english is terrible, sorry... :-()

    I hope this helped.
    :-) [b][blue]GAASHIUS[/blue][/b] :-)

Sign In or Register to comment.