mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 01:27:18 -04:00
Set LIBGL_ES=3 when GLES3 context can be created
This commit is contained in:
parent
2100287f88
commit
21799472ba
@ -186,8 +186,12 @@ Java_org_lwjgl_glfw_GLFW_nativeEglCreateContext(JNIEnv *env, jclass clazz, jlong
|
||||
EGLContext* ctx = eglCreateContext(potatoBridge.eglDisplay,config,(void*)contextSrc,es3_ctx_attribs);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("Could not create ES3 context, fallbacking to ES2\n");
|
||||
setenv("LIBGL_ES", "2", 1);
|
||||
ctx = eglCreateContext(potatoBridge.eglDisplay,config,(void*)contextSrc,es2_ctx_attribs);
|
||||
} else {
|
||||
setenv("LIBGL_ES", "3", 1);
|
||||
}
|
||||
|
||||
printf("Created CTX pointer = %p\n",ctx);
|
||||
//(*env)->ThrowNew(env,(*env)->FindClass(env,"java/lang/Exception"),"Trace exception");
|
||||
return (long)ctx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user