[XNA] Setting Background Color Transparent?

Started by G_G, April 19, 2010, 10:38:16 am

Previous topic - Next topic

G_G

So I just ran into this. I tried drawing a sprite, it worked successfully but the background color of the sprite is showing when it shouldn't be.

Is there anyway to make a certain sprite's background transparent? Help is appreciated.

Aqua

XNA's sprite drawing doesn't have an alpha channel?

winkio

it does, he is just trying to change a solid background color to a transparent one from inside XNA.

There's nothing that jumps out from my memory, because I always worked with images setup the way I wanted to display them.  You'd probably have to use GetData on the Texture2D and set the alpha of all pixels of a certain color to 0.

G_G

Well in that case I think it might be easier to just open photoshop and make the background transparent. Haha thanks anyways!