Setting transparency in irrlicht scene

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
keerthikaitmit
Posts: 1
Joined: Mon Jun 30, 2014 8:06 am

Setting transparency in irrlicht scene

Post by keerthikaitmit »

I try to set background colour for irrlicht scene as transparent, but I can't figure out the way, Below is the code to set Background Color in irrlicht scene:

driver->beginScene(true, true, SColor(0, 255, 255, 255)); // BG colour
Is there a way to set BG colour in irrlicht scene transparent?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Setting transparency in irrlicht scene

Post by hendu »

That is how you do it. If you were to render to a texture with such a clear color and dump that tex, you'd see the expected result.

If you want a transparent window, you need to do OS-specific settings.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Setting transparency in irrlicht scene

Post by Nadro »

For transparent window you have to set "SIrrlichtCreationParameters::WithAlphaChannel" to "true".
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Setting transparency in irrlicht scene

Post by hybrid »

But most platforms do not support the proper transparent window creation, IIRC. It is only used to choose a screen mode with 32bit pixels.
Post Reply