I'm currently working on an Android app, which uses the Min3D library to render a 3D model (.obj file). (The Min3D lib is a 3D framework which uses OpenGL ES.)
Link to the Min3D version, I'm currently using: https://github.com/mengdd/min3d
I'm developing with Android Studio and everything worked fine until i updated all SDK platforms, the platform tools and the Gradle build tools. The problem now is, that I get an error message in the Event log, when I'm running the app on the emulator (no matter which Android API, it occurs in every API version), which says the following:
"Emulator: GL_INVALID_ENUM: Unknown parameter name 0x1600 for glLight(f/x)"
The app keeps running, but it doesn't render the 3d model anymore. But on real devices the 3d model is shown, although the message occurs.
To the error: It occurs in the file GLSurfaceView.java, which is part of the Android SDK:
/**
* Display the current render surface.
* @return the EGL error code from eglSwapBuffers.
*/
public int swap() {
if (! mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
return mEgl.eglGetError();
}
return EGL10.EGL_SUCCESS;
}
The error occurs in the if statement, when eglSwapBuffers() is called. The variable mEgl is of type EGL10 which is declared in the file EGL10.java (also part of the Android SDK). In EGL10.java several error codes are declared:
public interface EGL10 extends EGL {
int EGL_SUCCESS = 0x3000;
int EGL_NOT_INITIALIZED = 0x3001;
int EGL_BAD_ACCESS = 0x3002;
int EGL_BAD_ALLOC = 0x3003;
int EGL_BAD_ATTRIBUTE = 0x3004;
int EGL_BAD_CONFIG = 0x3005;
int EGL_BAD_CONTEXT = 0x3006;
int EGL_BAD_CURRENT_SURFACE = 0x3007;
int EGL_BAD_DISPLAY = 0x3008;
int EGL_BAD_MATCH = 0x3009;
// and so on
// ...some other declarations
}
One thing to consider is, that the 0x1600 code of the error message I'm getting, isn't declared in this file. I'm not sure whether this is the problem or not. I also don't know if the problem is caused by the Min3D library or if it is a bug in the Android SDK. Maybe the Min3D library simply isn't compatible with the new Android SDK versions.
Does anyone know what's the problem or has anyone faced the same issue? Any solutions?
Thx!!
Current versions I'm using:
Gradle build tools 26.02
Android SDK platform tools: 27.01