Question

Examples I find around the internet seem to use EGL10.EGL_NATIVE_RENDERABLE for the first parameter, and "null" for the second parameter of eglWaitNative. For example:

EGL10 egl = (EGL10) EGLContext.getEGL();
egl.eglWaitNative( EGL10.EGL_NATIVE_RENDERABLE, null );
egl.eglWaitGL();
egl.eglSwapBuffers(mEGLDisplay, mEGLSurface);

However, on the Galaxy Nexus, this results in the following error message spamming the logcat output:

E/IMGSRV  ([pid]): :0: WSEGL_WaitNative: Unrecognized engine

It seems like that first parameter must be wrong, because the API has it listed as an int called "engine", which seems to match the error message "unrecognised engine". If so, what should I use instead? If the second parameter is the problem, then according to the API, it is of type "Object", and represents a platform-specific object describing the rendering target. I can't seem to figure out what else can go here besides "null", though. Am I completely off track?

Was it helpful?

Solution

The first parameter should be EGL10.EGL_CORE_NATIVE_ENGINE, not EGL10.EGL_NATIVE_RENDERABLE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top