Alpha value ignored in draw2dimage

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
csg
Posts: 14
Joined: Sun Sep 17, 2006 6:45 pm

Alpha value ignored in draw2dimage

Post by csg »

I know, this question was asked many times, but i couldnt find an answer by searching the forum.
The problem is das Irrlicht ignore the alpha value for the transparency of a picture.

Code: Select all

driver->draw2DImage(image, pos , rect , 0, SColor(150,255,255,255))
I should draw it half-transparent, but the picture is shown as normal...
I use Irrlicht 1.0, and it doenst work with any device.

Maybe anyone know a quick workaround, to solve the problem :(
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The last parameter of draw2DImage() specifies that you do or do not want to use the alpha channel of the texture. By default it is off. Have you tried to use that parameter to make it work like you want?

Travis
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Just apply this patch:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12387

Regards - Xaron
csg
Posts: 14
Joined: Sun Sep 17, 2006 6:45 pm

Post by csg »

Thanks for the code!
I compiled the dll with this changes, but i had to decomment the direct3d8 support in the IrrCompileConfig.h.
If i run my programm now, the compiler say "DIRECT3D9 Driver was not compiled into this dll. Try another one."
any idea how i can compile the dll with DD9 support, or how to insert the changes in another way?
:(
Post Reply