[Android] Init Ogre without ANativeWindow

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
Unick
Gnoblar
Posts: 14
Joined: Wed Jan 22, 2014 4:48 pm

[Android] Init Ogre without ANativeWindow

Post 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?
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 325
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 97

Re: [Android] Init Ogre without ANativeWindow

Post by sercero »

Hello,

Check out this thread: how to run OGRE without screen display? (viewtopic.php?f=2&t=90879)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4906
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1134
Contact:

Re: [Android] Init Ogre without ANativeWindow

Post by dark_sylinc »

sercero wrote: Wed Dec 15, 2021 4:05 am Hello,
Check out this thread: how to run OGRE without screen display? (viewtopic.php?f=2&t=90879)
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.
Post Reply