image is splited in normal and alpha part

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
Arudil
Posts: 27
Joined: Sun Sep 28, 2003 7:59 am
Location: Germany
Contact:

image is splited in normal and alpha part

Post by Arudil »

hello..

i've a strange problem:

Image

you seee, the top part is normal, it has an alpha channel and it is transparent... but the buttom-part has an error.. the non-alpha colors are transparent and the alpha-color is non-transparent...

Thats the simple code:

Code: Select all

video::ITexture* HUD = 0; //global variable

[...]

HUD = driver->getTexture("hud.bmp"); //load the image
driver->makeColorKeyTexture(HUD, core::position2d<s32>(0,0)); //make it transparent

[...]
while(foo->bar)
{
[...]
if (HUD) driver->draw2DImage(HUD,core::position2d<s32>(0,screensize.Height-200),core::rect<s32>(0,0,480,200),0,video::SColor(255,255,255,255),true); //draw it
[...]
}
the image is 24bit, bmp

to get it, click here and click hud.bmp

btw, i'm 0.4-user
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Maybe you can solve your problem by changing the size of the texture to power of 2. For example to 512x256. Hope it helps.
Arudil
Posts: 27
Joined: Sun Sep 28, 2003 7:59 am
Location: Germany
Contact:

Post by Arudil »

yo :D thanks
Post Reply