Page 1 of 1
[Android] Init Ogre without ANativeWindow
Posted: Wed Dec 08, 2021 5:58 pm
by Unick
Hello.
I took Ogre from branch 13.2.0. I want to use it without render to display, I want only render to texture. Is it possible to init Ogre without ANativeWindow? I am developing a library and I have no windows/activities in my lib.
How I know it is possible to init OpenGl ES on Android without Window, but I am not sure, is it implemented in Ogre?
Or Does Ogre-next support it?
Re: [Android] Init Ogre without ANativeWindow
Posted: Wed Dec 15, 2021 4:05 am
by sercero
Hello,
Check out this thread: how to run OGRE without screen display? (
viewtopic.php?f=2&t=90879)
Re: [Android] Init Ogre without ANativeWindow
Posted: Wed Dec 15, 2021 10:00 pm
by dark_sylinc
The NULL RenderSystem won't actually render anything. It will just pretend. The main goal is that you can run normal code that depends on Ogre as a standalone server that simulates logic and physics without having to remove all the Ogre stuff.
As for the original question:
Is it possible to init Ogre without ANativeWindow?
Assuming NULL RenderSystem is not for you, Ogre-Next doesn't support in on Android.
It does have support for Linux on OpenGL using EGL Headless (On Windows too but usually drivers skip EGL headless support on Windows).
On Ogre-Next, only Vulkan works for Android and we only implemented the ANativeWindow interface.
It should be possible to write a simple backend without any windowing; but we just didn't write it (yet). Also I don't know if Android allows ANativeWindow-less Vulkan (Vulkan does support it, but that doesn't mean the OS has to allow it. Particularly Android is picky with its permission stuff)
I can't talk for whether Ogre 1 supports it.