views:

37

answers:

1

I'm having trouble drawing a font with an alpha channel:

gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();

font->draw(L"C'mon, be transparent, PLEASE!!!",
           core::rect<s32>(130,10,300,50),
           video::SColor(127,255,255,255));

As you can see, the text should have an alpha value of 127... but it doesn't.

How can I draw transparent text?

A: 

I found out that if I use SOFTWARE driver instead of OPEN_GL or DirectX, I also get your problem. But with OpenGL or DirectX it works fine. So if it is an option you can one of these drivers below:

video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
video::E_DRIVER_TYPE driverType = video::video::EDT_DIRECT3D8;
video::E_DRIVER_TYPE driverType = video::video::EDT_DIRECT3D9;
ILikeGameProgramming
I'm using Linux, so the DirectX driver is not an option.
George Edison
@George But OpenGL definitely should be. Did using OpenGL rendering fix the transparency issue?
Victor T.