Init GL4ES after make current

This commit is contained in:
khanhduytran0 2020-09-06 07:54:15 +07:00
parent d2609d4a11
commit 81ddd9905a

View File

@ -1,8 +1,11 @@
#include <jni.h>
#include <assert.h>
#include <dlfcn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <EGL/egl.h>
#ifdef GLES_TEST
@ -139,6 +142,9 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
}
// Init gl4es before
dlopen("libgl04es.so", RTLD_GLOBAL | RTLD_LAZY);
// Test
#ifdef GLES_TEST
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);