I'm currently trying to integrate Ogre (using the OgreJNI-Version) into my App by using fragments. For first tests I was using a normal Activity. Ogre works fine, no exception or problems. But after I used nearly the same code in a Fragment I got strange behavior.
The Layout:
I have a two panel design with a menu on the left and the main-stage on the right
Problem:
Ogre with the scene and all is loading without problem, even rendering works fine. But in the moment I touched something OUTSIDE the ogre-fragment, for example the menu (not necessarily a menu-entry), a get the following error while trying to render one frame:
Code: Select all
E/OGRE(4839): OGRE EXCEPTION(3:RenderingAPIException): Fail to SwapBuffers in swapBuffers at .\..\..\..\..\RenderSystems\GLES2\src\EGL\OgreEGLWindow.cpp (line 161)
This also happens when the back-button is pressed (moments before "onPause" is called).
Environment:
I'm using the 1-9 branch from around 2 weeks ago. A targeted, while building ogre and on the ndk-level in my project, the api 9. As Android-SDK I target API-level 14 (i can't get lower because I need some functionality from higher than api 10).
Devices:
The problem accures on all my devices.
Samsung Galaxy Note 2 10.1 (Android 4.2.2)
Asus Transformer Pad Infitity (TF700T) (Android 4.2.2)
I've tried many things to find the moment the ogre-exception is produced, but no success so far. So without any more ideas I came here with the hope that somebody might help me out.
Thanks.