eglSwapBuffers失败:EGL_BAD_ALLOC AndEngine Android的 [英] eglSwapBuffers failed: EGL_BAD_ALLOC AndEngine Android

查看:1704
本文介绍了eglSwapBuffers失败:EGL_BAD_ALLOC AndEngine Android的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米开发游戏和发动机会抛出异常。其实我不知道的地步,异常发生。据悉,目前市场上很多很多的时间。

I m developing a game in And engine which throws the exception. Actually I don't know the point where exceptions occurs. It is reported in market many many time.

    java.lang.RuntimeException: eglSwapBuffers failed: EGL_BAD_ALLOC
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1080)
at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1038)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1364)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

有没有为这一个?

is there any solution for this one??

推荐答案

此错误可能发生在你不通知GLSurfaceView有关活动的状态跃迁。 见下面的段落从这里: http://developer.android.com/reference/安卓/ OpenGL的/ GLSurfaceView.html

This error can occur when you don't notify the GLSurfaceView about state transistions of your Activity. See the following paragraph from here: http://developer.android.com/reference/android/opengl/GLSurfaceView.html

活动生命周期

当活动暂停的GLSurfaceView必须得到通知,并   恢复。 GLSurfaceView客户端需要调用的onPause()时   活动暂停,onResume()的活动恢复的时候。这些电话   让GLSurfaceView暂停和恢复渲染线程,并且还   让GLSurfaceView释放并重新创建了OpenGL显示。

A GLSurfaceView must be notified when the activity is paused and resumed. GLSurfaceView clients are required to call onPause() when the activity pauses and onResume() when the activity resumes. These calls allow GLSurfaceView to pause and resume the rendering thread, and also allow GLSurfaceView to release and recreate the OpenGL display.

我不知道andengine如何处理这虽然。

I don't know how andengine handles this though.

这篇关于eglSwapBuffers失败:EGL_BAD_ALLOC AndEngine Android的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆