mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 16:47:14 -04:00
[GLFW] Fix EGL stuff
This commit is contained in:
parent
e8cac591b1
commit
462afeca6a
@ -220,11 +220,12 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
||||
|
||||
if (window != 0x1) {
|
||||
printf("Making current on window %p\n", window);
|
||||
potatoBridge.eglContext = (EGLContext *) window;
|
||||
EGLBoolean success = eglMakeCurrent(
|
||||
potatoBridge.eglDisplay,
|
||||
potatoBridge.eglSurface,
|
||||
potatoBridge.eglSurface,
|
||||
/* window==0 ? EGL_NO_CONTEXT : */ (EGLContext *) window
|
||||
/* window == 0 ? EGL_NO_CONTEXT : */ (EGLContext *) window
|
||||
);
|
||||
if (success == EGL_FALSE) {
|
||||
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
|
||||
|
@ -772,11 +772,7 @@ public class GLFW
|
||||
}
|
||||
static boolean isGLFWReady;
|
||||
public static boolean glfwInit() {
|
||||
if (!isGLFWReady) {
|
||||
mGLFWInitialTime = (double) System.nanoTime();
|
||||
isGLFWReady = nativeEglInit();
|
||||
}
|
||||
return isGLFWReady;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void glfwTerminate() {
|
||||
@ -982,6 +978,11 @@ public class GLFW
|
||||
|
||||
// GLFW Window functions
|
||||
public static long glfwCreateWindow(int width, int height, CharSequence title, long monitor, long share) {
|
||||
if (!isGLFWReady) {
|
||||
mGLFWInitialTime = (double) System.nanoTime();
|
||||
isGLFWReady = nativeEglInit();
|
||||
}
|
||||
|
||||
EventLoop.OffScreen.check();
|
||||
// Create an ACTUAL EGL context
|
||||
long ptr = nativeEglCreateContext(share);
|
||||
|
Loading…
x
Reference in New Issue
Block a user