This commit is contained in:
Duy Tran Khanh committed 2021-01-02 12:17:57 +07:00
1 parent 1507531975
commit 78ab27d1ec
2 files changed
+3 -2

No files matched your search

@@ -934,15 +934,17 @@ public class GLFW
mGLFWGammaRamp = ramp;
}
private static long mGLFWCurrentGLContextThread = -1;
public static void glfwMakeContextCurrent(long window) {
long currentGLThreadId = Thread.currentThread().getId();
// Long.parseLong(System.getProperty("glfwstub.internal.glthreadid", "-1"));
System.out.println("GLFW: glfwMakeContextCurrent() calling from thread ID " + currentGLThreadId + ", name: " + Thread.currentThread().getName());
if (currentGLThreadId != -1 && currentGLThreadId != Thread.currentThread().getId()) {
if (currentGLThreadId != -1 && currentGLThreadId != mGLFWCurrentGLContextThread) {
System.out.println("GLFW: Current context is set, creating shared context");
if (!nativeEglMakeCurrent(window)) {
throw new RuntimeException("eglMakeCurrent() failed, check log file for more details");
}
mGLFWCurrentGLContextThread = currentGLThreadID;
} else {
System.out.println("GLFW: glfwMakeContextCurrent() request is skipped");
}
@@ -350,7 +350,6 @@ public final class GL {
long GL4ESInit = functionProvider.getFunctionAddress("initialize_gl4es");
if (GL4ESInit == NULL) {
throw new IllegalStateException("initialize_gl4es() could not be found. Make sure that the OpenGL library is GL4ES.");
}
}
callV(GL4ESInit);