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 »

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!
alim
Gnoblar
Posts: 5
Joined: Mon Feb 20, 2017 3:44 am

Re: About background transparent

Post by alim »

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?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: About background transparent

Post by paroj »

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
alim
Gnoblar
Posts: 5
Joined: Mon Feb 20, 2017 3:44 am

Re: About background transparent

Post by alim »

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!
Post Reply