transprent PNG display

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
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

transprent PNG display

Post by st0ph »

Hi!
I have created a png image but when I load it into my game it looses it's transparency :(
I used an IGUIImage :

Code: Select all

imgAchievment = guienv->addImage(irr::core::rect< irr::s32 >(driver->getScreenSize().Width - 300,
driver->getScreenSize().Height - 70,driver->getScreenSize().Width,driver->getScreenSize().Height));
    imgAchievment->setImage(driver->getTexture(path));
    imgAchievment->setVisible(false);

here is a screenshot :

Image




and here is my png image :

Image

what shall I do ?
st0ph
Posts: 27
Joined: Sat Aug 04, 2012 3:00 pm

Re: transprent PNG display

Post by st0ph »

I found it, I used

Code: Select all

imgAchievment->setUseAlphaChannel(true);
and it worked like a charm :)
Post Reply