[no bug]draw2DImage alpha problem

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Grz-
Posts: 62
Joined: Wed Dec 26, 2007 1:06 pm

[no bug]draw2DImage alpha problem

Post by Grz- »

Hi,

i got a problem that seem a bug with the method draw2DImage that can scale the image using the dstrect, the alpha transparency work but it seem that even with a value of 255 the image is still transparent.

Example:

Image

I draw the logo using the following code:

Code: Select all

		driver->beginScene(true, true, video::SColor(255,60,60,60));
        smgr->drawAll();
        driver->draw2DImage(logo, core::rect<s32>(0,0,512,512),
                                core::rect<s32>(0,0,logo->getSize().Width,logo->getSize().Height),0,
                                &video::SColor(255,255,255,255), true);
		driver->endScene();
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

As always, this method is used wrongly. This specific draw2dImage call requires an array of 4 SColor values, not a pointer to one. This will make the vertex alpha wrong, hence resulting in broken transparency of the image.
Post Reply