About makeColorKeyTexture

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
wuyihao
Posts: 7
Joined: Wed Feb 17, 2010 7:21 am

About makeColorKeyTexture

Post by wuyihao »

Code: Select all

video::ITexture* image = driver->getTexture("./media/hero.png");

driver->makeColorKeyTexture(image,core::position2d<s32>(0,0));

driver->draw2DImage(image,core::position2d<s32>(x,y));
Those are parts of my project.
But after it drew on the device.I found it does'nt have a Alpha channel.Why?

Thank you
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

BC Color-key and Alpha blending could not be together... you have to choose. 8)))
Do you like VODKA???
Image
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Question is, if the previous alpha channel is meant, or alpha channel at all. You may have to pass the correct parameter to the draw2DImage method.
wuyihao
Posts: 7
Joined: Wed Feb 17, 2010 7:21 am

Post by wuyihao »

:?: Sorry.I don't quit understand what I should do
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You shall explain what you really meant with your statement. What part of the alpha channel is broken?
Post Reply