Improve error message thrown when eglCreateContext fails.

This commit is contained in:
Jack Palevich
2009-12-04 17:15:07 +08:00
parent d682ab72c5
commit 9bb4dbae91

View File

@@ -847,7 +847,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
*/
mEglContext = mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig);
if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {
throw new RuntimeException("createContext failed");
throwEglException("createContext");
}
mEglSurface = null;