Hello and welcome.
I think your problem 2 is the same as the first one - the font gets baked to, then rendered from, a texture; rendering it upside down will garble the text.
It looks like only the GUI textures are upside down, whereas the world is fine. I would suggest looking in 'myguirendermanager.cpp' which is where we tie the GUI to OpenGL (and OSG). In particular this code here is supposed to flip textures to their correct orientation:
Code: Select all
// need to flip tex coords since MyGUI uses DirectX convention of top left image origin
osg::Matrix flipMat;
flipMat.preMultTranslate(osg::Vec3f(0,1,0));
flipMat.preMultScale(osg::Vec3f(1,-1,1));
mStateSet->setTextureAttribute(0, new osg::TexMat(flipMat), osg::StateAttribute::ON);
Last I looked at the android port, IIRC it was using a translation layer from OpenGL to OpenGLES to make things work. Possibly that layer has problems handling texture matrices? If that is the case, you should also see issues with e.g. waterfalls in vivec not animating.
Long term, I would think it'd be better to use OpenGLES natively instead of using a wrapper. Now that we support shaders (which wasn't the case last time), part of the work to migrating to GLES2 or GLES3 is already done, too. However, we still use fixed function state
inside the shaders so that would still need to be managed, plus there is the sky which doesn't support shaders yet. Interestingly, there is some work in upstream OSG in the 'shader_pipeline' branch that aims to emulate the fixed pipeline in a shader. I'm not sure how finished that is, though.
Or you could try GLES1 as the easier (yet less future-proof) path.
Regarding your issues on github,
1. the char / unsigned char is IIRC already fixed upstream, if this is the case then for a cleaner history we should cherry pick their commit or rebase the fork top of the new version. Can you check?
2. the crash with glGetVersion might be the symptom of another issue, like calling OpenGL from the wrong thread maybe?