mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 00:59:35 -04:00
Disable OpenGL validation check in EGL, bind to desktop GL on ANGLE
This commit is contained in:
parent
a05600e597
commit
537581c21d
@ -226,7 +226,7 @@ public class JREUtils {
|
||||
if(LOCAL_RENDERER != null) {
|
||||
envMap.put("POJAV_RENDERER", LOCAL_RENDERER);
|
||||
}
|
||||
if(LOCAL_RENDERER.equals("opengles3_angle_vulkan")) envMap.put("POJAVEXEC_EGL","libEGL_angle.so"); // use ANGLE egl
|
||||
if(LOCAL_RENDERER.equals("opengles3_desktopgl_angle_vulkan")) envMap.put("POJAVEXEC_EGL","libEGL_angle.so"); // use ANGLE egl
|
||||
envMap.put("AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth > 0 ? CallbackBridge.windowWidth : CallbackBridge.physicalWidth));
|
||||
envMap.put("AWTSTUB_HEIGHT", Integer.toString(CallbackBridge.windowHeight > 0 ? CallbackBridge.windowHeight : CallbackBridge.physicalHeight));
|
||||
|
||||
@ -416,7 +416,7 @@ public class JREUtils {
|
||||
case "opengles3": renderLibrary = "libgl4es_115.so"; break;
|
||||
case "vulkan_zink": renderLibrary = "libOSMesa_8.so"; break;
|
||||
case "opengles3_vgpu" : renderLibrary = "libvgpu.so"; break;
|
||||
case "opengles3_angle_vulkan" : renderLibrary = "libtinywrapper.so"; break;
|
||||
case "opengles3_desktopgl_angle_vulkan" : renderLibrary = "libtinywrapper.so"; break;
|
||||
default:
|
||||
Log.w("RENDER_LIBRARY", "No renderer selected, defaulting to opengles2");
|
||||
renderLibrary = "libgl4es_114.so";
|
||||
|
@ -785,9 +785,17 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglInit(JNIEnv* env, j
|
||||
}
|
||||
|
||||
ANativeWindow_setBuffersGeometry(potatoBridge.androidWindow, 0, 0, vid);
|
||||
|
||||
eglBindAPI_p(EGL_OPENGL_ES_API);
|
||||
|
||||
{
|
||||
EGLBoolean bindResult;
|
||||
if (strncmp(renderer, "opengles3_desktopgl", 19) == 0) {
|
||||
printf("EGLBridge: Binding to desktop OpenGL\n");
|
||||
bindResult = eglBindAPI_p(EGL_OPENGL_API);
|
||||
} else {
|
||||
printf("EGLBridge: Binding to OpenGL ES\n");
|
||||
bindResult = eglBindAPI_p(EGL_OPENGL_ES_API);
|
||||
}
|
||||
if(!bindResult) printf("EGLBridge: bind failed: %p\n", eglGetError_p());
|
||||
}
|
||||
potatoBridge.eglSurface = eglCreateWindowSurface_p(potatoBridge.eglDisplay, config, potatoBridge.androidWindow, NULL);
|
||||
|
||||
if (!potatoBridge.eglSurface) {
|
||||
|
Binary file not shown.
@ -22,6 +22,6 @@
|
||||
<item>opengles3</item> <!-- gl4es 1.1.5 with OpenGL ES 3 -->
|
||||
<item>vulkan_zink</item>
|
||||
<item>opengles3_vgpu</item> <!-- vgpu with OpenGL ES 3 -->
|
||||
<item>opengles3_angle_vulkan</item>
|
||||
<item>opengles3_desktopgl_angle_vulkan</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user