About background transparent

Problems building or running the engine, queries about how to use features etc.
Post Reply
songzi
Gnoblar
Posts: 2
Joined: Mon Sep 23, 2013 3:08 pm

About background transparent

Post by songzi » Mon Sep 23, 2013 3:25 pm

we are using ogre on android.
we use the following codes to create a RenderWindow.

Code: Select all

ANativeWindow* nativeWnd = ANativeWindow_fromSurface(env, surface);
Ogre::NameValuePairList opt;
opt["externalWindowHandle"] = Ogre::StringConverter::toString((int)nativeWnd);
gRenderWnd = gRoot->createRenderWindow("OgreWindow", 0, 0, false, &opt);
we want make the RenderWindow's background to transparent, try to use the following codes

Code: Select all

vp->setBackgroundColour(Ogre::ColourValue(0,0,0,0));
But no effect, the RenderWindow's background is still black.

Who can help us, thank you!
0 x

alim
Gnoblar
Posts: 5
Joined: Mon Feb 20, 2017 3:44 am

Re: About background transparent

Post by alim » Thu Apr 06, 2017 5:59 am

I found a similar problem in Android! Have you solved it yet?

I suspect it has something to do with Mediatek-GPU's powered Android devices?
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 637
Joined: Sun Mar 30, 2014 2:51 pm
x 89
Contact:

Re: About background transparent

Post by paroj » Thu Apr 06, 2017 5:43 pm

you need to create an RGBA render window to use transparency on the window level. Try setting "minColourBufferSize" to 32.
https://ogrecave.github.io/ogre/api/1.1 ... 2f6e6c847e
0 x

alim
Gnoblar
Posts: 5
Joined: Mon Feb 20, 2017 3:44 am

Re: About background transparent

Post by alim » Mon Apr 10, 2017 7:49 am

paroj wrote:you need to create an RGBA render window to use transparency on the window level. Try setting "minColourBufferSize" to 32.
https://ogrecave.github.io/ogre/api/1.1 ... 2f6e6c847e
Oh my god, it actually worked :D :D :D

Thanks a lot! this one line of code has resolved my problem since ages ago!
0 x

Post Reply