set a transparent colour on a texture

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
~ Dream
Posts: 12
Joined: Fri Jun 29, 2007 11:28 am
Location: The Dream World

set a transparent colour on a texture

Post by ~ Dream »

http://www.hostpic.biz/uploads/11daf83564.jpg

I placed a png image on the screen. If I want white to be the transparent colour, is it possible to do it in Irrlicht or I have to use gif with a transparent colour set? So the output is something like this, http://www.hostpic.biz/uploads/1a6d7f2c35.jpg
~ Dream
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

you can use the makeColorKeyTexture to convert to a texture with alpha channel, but you can also do it with your gfx tool. Then you have to enable the alpha flag when drawing the image to the screen (check the API, there's a flag for alpha transparency).
Post Reply