RTSS and Android 4.3 problem?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

RTSS and Android 4.3 problem?

Post by Loudyin »

I've been experimenting with Ogre on Android and so far so good. I've been using GLES 2, and RTSS was working fine.

I recently updated my Nexus 10 to Android 4.3 (from 4.2.2) and now anything using RTSS is not showing, giving the following error:

GLSL ES compile log: RTSS_1_VS
0:1: P0007: Language version '300' unknown, this compiler only supports up to version '300 es'

Custom shaders are still displaying fine. To check it wasn't something in my code, I checked by running the GLES 2 sample and have the same problem.

Has anyone else had this problem?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Is GLES 3 supported on your device? That could be the problem. Also, are you using 1.8 or 1.9. If 1.9, did you enable GLES3 support via CMake?
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

Re: RTSS and Android 4.3 problem?

Post by Loudyin »

Ah, thanks for that, I see now that GLES 3 support has been added with Android 4.3, and the Nexus 10 supports it - checked and the ogre log file on running the app says GL_VERSION = OpenGL ES 3.0

I'm just using the default Ogre 1.9 RC1 android sdk from the downloads section on the website. Sorry if this is a naive question, but compiling from source to enable GLES 3 support should do things differently even if I'm still making a GLES 2 app?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Yeah it should.

I wonder if it's automatically creating a GLES 3 context even when a 2.0 context is requested. I don't have a device that supports 4.3 properly here, could you try building without GLES3 support enabled to see what the GL_VERSION is?
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

Re: RTSS and Android 4.3 problem?

Post by Loudyin »

I'll try building Ogre from source later on tonight and let you know how I get on. Using the precompiled 1.9 RC1 SDK it does seem to be giving a gles 3 context even though I'm requesting gles2:

GLES2RenderSystem::_createRenderWindow "OgreWindow", 0x0 windowed miscParams: androidConfig=1913048560 externalWindowHandle=1913038376
08-02 17:21:18.032: D/mali_winsys(25397): new_window_surface returns 0x3000
08-02 17:21:18.082: I/OGRE(25397): GL_VERSION = OpenGL ES 3.0
08-02 17:21:18.082: I/OGRE(25397): GL_VENDOR = ARM
08-02 17:21:18.082: I/OGRE(25397): GL_RENDERER = Mali-T604
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Ok. Make sure to use the latest mercurial code. It'll be very useful to know how the drivers behave.
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

Re: RTSS and Android 4.3 problem?

Post by Loudyin »

Ok, I've hardly ever used cmake so may not be doing this right...

I got the latest 1.9 source, followed the instructions on http://www.ogre3d.org/tikiwiki/CMake%20 ... on=Android.
Did cmake (default settings), then nmake and it stopped half way through, just after making OgreMain. Was able to individually compile the different libraries I needed though by individually typing e.g. 'nmake RenderSystem_GLES2'.

This seemed to build ok then, linked to the GLES2 sample and same result - was using a GLES3 context and RTSS shaders don't compile.

I then created a new build folder, and this time set 'OGRE_CONFIG_ENABLE_GLES3_SUPPORT:BOOL=ON' in CMakeCache.txt and reran cmake. nmake failed half way through again. Building individual libraries worked fine again apart from RenderSystem_GLES2 which failed so haven't been able to test this.

..\..\..\RenderSystems\GLES2\src\OgreGLES2PixelFormat.cpp: In static member func
tion 'static Ogre::PixelFormat Ogre::GLES2PixelUtil::getClosestOGREFormat(GLenum
, GLenum)':
..\..\..\RenderSystems\GLES2\src\OgreGLES2PixelFormat.cpp:649:18: error: 'GL_BGR
A' was not declared in this scope

So, have I done this right? If so, any thoughts on anything to try next?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Oh yeah, I have that fixed locally. Let me push it then you can update and actually build.
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

Re: RTSS and Android 4.3 problem?

Post by Loudyin »

Thanks for the help, was able to build it this time.

So on running it this time, the device still provides a GLES3 surface. The compile error for the vertex shaders are different now though, they all fail on:

L0003: Keyword 'attribute' is reserved

I haven't read up on differences between GLES2 and GLES3 yet. Would this be easy to fix?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Ok, I got a Nexus 7 today so I can reproduce this issue and fix whatever else crops up.
Loudyin
Gnoblar
Posts: 10
Joined: Thu Jul 15, 2010 10:17 pm
x 1

Re: RTSS and Android 4.3 problem?

Post by Loudyin »

Great, look forward to hearing more about how things progress. If I can be any help in further testing let me know.

I'll keep working away on my application using my own shaders at the moment, and will leave the RTSS errors to run in the background just now.
gamedboy
Gremlin
Posts: 168
Joined: Wed Sep 19, 2007 1:19 pm
Location: singapore
x 3

Re: RTSS and Android 4.3 problem?

Post by gamedboy »

Hi masterfalcon, Loudyin,

I have managed to compile Ogre with gles 3.0 support on, but the samplebrowser no longer works on galaxy note 10.1, it is running android 4.1.2.

Would the fix be backward compatible with device without gles 3.0 support?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: RTSS and Android 4.3 problem?

Post by masterfalcon »

Not at this time but it is something that I've considered and think we need to address as the GLES3 support matures.
gamedboy
Gremlin
Posts: 168
Joined: Wed Sep 19, 2007 1:19 pm
Location: singapore
x 3

Re: RTSS and Android 4.3 problem?

Post by gamedboy »

Thanks for the info, I will use custom shaders for now.
Post Reply