EglSwapBuffers exception on Android (EGL_BAD_CONTEXT )

ogre 1.9 在通过ndk方式做Android程序时,黑屏不渲染,且程序死掉。
报错如下

01-02 01:02:10.055: I/OGRE(16742): EGL error 0x3006 in virtual void Ogre::EGLWindow::swapBuffers(bool) at line 320 in ..\..\..\RenderSystems\GLES\src\EGL\OgreEGLWindow.cpp 
01-02 01:02:10.056: E/OGRE(16742): OGRE EXCEPTION(3:RenderingAPIException): Fail to SwapBuffers in swapBuffers at ..\..\..\RenderSystems\GLES\src\EGL\OgreEGLWindow.cpp (line 323)

参考ogre官网这里写链接内容

void AndroidEGLWindow::_resetContext()
    {
        mContext->endCurrent();
        mContext->setCurrent();
    }

在每次调用或者窗口切换时,都调用这句。
但是我的还是没有解决。
进一步寻找。

猜你喜欢

转载自blog.csdn.net/mansir123/article/details/73831238