A question about Ogre3D, shading languages and cross platform development

Problems building or running the engine, queries about how to use features etc.
Post Reply
ferris
Gnoblar
Posts: 2
Joined: Tue Nov 26, 2019 6:25 pm

A question about Ogre3D, shading languages and cross platform development

Post by ferris » Tue Nov 26, 2019 6:52 pm

Ogre Version: :1.12.3:
Operating System: :iOS, Android:

Hi, i am developing a cross platform app using Flutter. I am currently using OpenGL ES together with C++ to render 3D geometry and using fragment shaders to add effects (i am using Flutter to do UI/logic handling and OpenGL ES+proprietary C++ libs for heavy image processing tasks). Little note: this is basically my first time using OpenGL ES, so i am really a noob regarding GPUs and graphic libraries. I would like to publish my app both for iOS and Android. I have never developed anything on iOS. Today i have discovered that Apple deprecated OpenGL ES (ugh) in favor of Metal API. It seems to me that Ogre3D supports Metal, so it is up to date in that respect.
The question is: do i need to write two different fragment shader code (one for Android (OpenGL ES) and one for iOS(Metal))? Does Ogre3D offers a single shading language and translate it to the appropriate language depending on the target platform?
0 x

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

Re: A question about Ogre3D, shading languages and cross platform development

Post by paroj » Tue Nov 26, 2019 8:08 pm

unfortunately Ogre v1 currently does not support Metal, while Ogre v2 currently does not support Android. But Apple is getting some backlash regarding their OpenGL deprecation, so probably it will still be there for some time.

Regarding your shader question: Ogre does not address this specifically, however you can get away with a GLSL dialect which is a subset of all shader languages (HLSL & Metal).
All you need is some pre-processor defines, see: https://bkaradzic.github.io/bgfx/tools.html
0 x

ferris
Gnoblar
Posts: 2
Joined: Tue Nov 26, 2019 6:25 pm

Re: A question about Ogre3D, shading languages and cross platform development

Post by ferris » Wed Nov 27, 2019 5:43 pm

I think i will stick to my original plan: to use OpenGL ES till Apple will not support it anymore. Didn't know of bgfx, it's really interesting.
Thank you.
0 x

Post Reply