MyGUI on mobiles - rendering in OpenGL ES 2


02-08-2012 14:14:27

Hi, we are converting a project from Windows to mobile through Ogre3d4Marmalde. Our project uses MyGUI, so this needs to be made to work with OpenGL ES 2, too.

As far as I understand, in Ogre, Renderables are grouped by Pass. For each group of Renderables with the same Pass, SceneMngr::_setPass will be called, which will bind gpu program, before RenderSystem::_render(const RenderOperation& op) gets called.

MyGUI rendering works differently. Every object has a vertex buffer and a texture and as it is rendered it sets it's texture with RenderSystem::_setTexture and then builds RenderOperations which sends to RenderSystem::_render. But this method does not work with OpenGLES2RenderSystem because no program is bound before rendering.

Please, can anyone suggest what we might do to implement MyGUI rendering in Ogre3d4Marmalade;


18-09-2012 22:05:25

I guess this is why I get the problem I describe here: viewtopic.php?f=17&t=29658

I'd forgotten MyGUI uses overlays or something like that, fundamentally different to the rest of Ogre. In this thread (viewtopic.php?f=17&t=29605) they talk about supplying shaders explicitly but I don't know why that works and RTSS doesn't.

Let's hope we can find a solution; I don't think MyGUI is great for multi-touch but many apps don't need multitouch and a regular GUI is very valuable.