mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 07:39:00 -04:00
Multiple changes
- Disable ClassWrapper - Try get multiple GL contexts
This commit is contained in:
parent
8989a09326
commit
d606d25bea
@ -105,14 +105,15 @@ public final class Tools
|
||||
getJavaArgs(ctx, javaArgList);
|
||||
|
||||
javaArgList.add("-cp");
|
||||
/*
|
||||
if (versionInfo.mainClass.equals("net.minecraft.launchwrapper.Launch")) {
|
||||
// Also preload LWJGL3 to fix crash on send input events
|
||||
javaArgList.add(Tools.MAIN_PATH + "/lwjgl3/ClassWrapper.jar:" + getLWJGL3ClassPath());
|
||||
javaArgList.add("ClassWrapper");
|
||||
javaArgList.add(launchClassPath);
|
||||
} else {
|
||||
} else { */
|
||||
javaArgList.add(getLWJGL3ClassPath() + ":" + launchClassPath);
|
||||
}
|
||||
// }
|
||||
|
||||
javaArgList.add(versionInfo.mainClass);
|
||||
javaArgList.addAll(Arrays.asList(launchArgs));
|
||||
|
@ -30,6 +30,7 @@ struct PotatoBridge {
|
||||
*/
|
||||
};
|
||||
struct PotatoBridge potatoBridge;
|
||||
EGLConfig config;
|
||||
|
||||
typedef jint RegalMakeCurrent_func(EGLContext context);
|
||||
|
||||
@ -58,11 +59,20 @@ void terminateEgl() {
|
||||
potatoBridge.eglSurface = EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglGetCurrentContext(JNIEnv* env, jclass clazz) {
|
||||
return (jlong) (uintptr_t) potatoBridge.eglContext;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglInit(JNIEnv* env, jclass clazz) {
|
||||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* env, jclass clazz) {
|
||||
static const EGLint ctx_attribs[] = {
|
||||
EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
if (potatoBridge.eglContext != EGL_NO_CONTEXT) {
|
||||
potatoBridge.eglContextOld = potatoBridge.eglContext;
|
||||
potatoBridge.eglContext = eglCreateContext(potatoBridge.eglDisplay, config, potatoBridge.eglContextOld, ctx_attribs);
|
||||
@ -93,12 +103,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||
EGL_NONE
|
||||
};
|
||||
static const EGLint ctx_attribs[] = {
|
||||
EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
EGLConfig config;
|
||||
|
||||
EGLint num_configs;
|
||||
EGLint vid;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user