Re: eglSwapBuffers() freezes after APP_CMD_TERM_WINDOW / APP_CMD_INIT_WINDOW

306 views
Skip to first unread message
Message has been deleted
Message has been deleted

Dan V.

unread,
Sep 29, 2011, 1:51:25 AM9/29/11
to android-ndk
I'm not sure if this will help, but I've had freezing/crash issues on
another HTC phone that I traced to the context teardown. Other phones
did not have this problem.

If your code is based on the native-activity sample, try disabling
these lines in your teardown and see if it changes the behaviour:

if (engine->display != EGL_NO_DISPLAY) {
/* CRASH ON HTC
eglMakeCurrent(engine->display, EGL_NO_SURFACE,
EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (engine->context != EGL_NO_CONTEXT) {
eglDestroyContext(engine->display, engine->context);
}
if (engine->surface != EGL_NO_SURFACE) {
eglDestroySurface(engine->display, engine->surface);
}
eglTerminate(engine->display);
*/
}

Dan.


On Sep 27, 6:15 pm, Nick <nicolas.jincher...@gmail.com> wrote:
> bump
>
> On Sep 24, 9:43 pm, Nick <nicolas.jincher...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I am trying to handle APP_CMD_TERM_WINDOW and APP_CMD_INIT_WINDOW in
> > my native app,  but when the app's window is restored,
> > eglSwapBuffers() will freeze indefinately the first time it is called.
>
> > I have ensured that EGL is initialized properly upon receiving
> > APP_CMD_INIT_WINDOW, all textures have been re-uploaded, and all
> > shaders reinitialized, but I still havev't had any luck.
>
> > I am using Android 2.3 on HTC desire.
>
> > Does anyone have any idea why this is happening?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages