mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-13 06:39:54 -04:00
Debug
This commit is contained in:
parent
84d39544ee
commit
84afa73a72
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
struct PotatoBridge {
|
struct PotatoBridge {
|
||||||
ANativeWindow* androidWindow;
|
ANativeWindow* androidWindow;
|
||||||
void* androidDisplay;
|
|
||||||
|
|
||||||
EGLContext* eglContext;
|
EGLContext* eglContext;
|
||||||
EGLDisplay eglDisplay;
|
EGLDisplay eglDisplay;
|
||||||
@ -30,7 +29,6 @@ struct PotatoBridge {
|
|||||||
struct PotatoBridge potatoBridge;
|
struct PotatoBridge potatoBridge;
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_JREUtils_setupBridgeWindow(JNIEnv* env, jclass clazz, jobject surface) {
|
JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_JREUtils_setupBridgeWindow(JNIEnv* env, jclass clazz, jobject surface) {
|
||||||
potatoBridge.androidDisplay = EGL_DEFAULT_DISPLAY;
|
|
||||||
potatoBridge.androidWindow = ANativeWindow_fromSurface(env, surface);
|
potatoBridge.androidWindow = ANativeWindow_fromSurface(env, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +48,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
|||||||
printf("EGLBridge: Initializing\n");
|
printf("EGLBridge: Initializing\n");
|
||||||
printf("ANativeWindow pointer = %p\n", potatoBridge.androidWindow);
|
printf("ANativeWindow pointer = %p\n", potatoBridge.androidWindow);
|
||||||
|
|
||||||
potatoBridge.eglDisplay = eglGetDisplay(potatoBridge.androidDisplay);
|
potatoBridge.eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||||
if (potatoBridge.eglDisplay == EGL_NO_DISPLAY) {
|
if (potatoBridge.eglDisplay == EGL_NO_DISPLAY) {
|
||||||
printf("Error: eglGetDefaultDisplay() failed: %p\n", eglGetError());
|
printf("Error: eglGetDefaultDisplay() failed: %p\n", eglGetError());
|
||||||
return JNI_FALSE;
|
return JNI_FALSE;
|
||||||
@ -148,9 +146,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
|||||||
|
|
||||||
// Test
|
// Test
|
||||||
#ifdef GLES_TEST
|
#ifdef GLES_TEST
|
||||||
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
glClearColor(0.4f, 0.4f, 0.4f, 1.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
eglSwapBuffers(potatoBridge.eglDisplay, potatoBridge.eglSurface);
|
eglSwapBuffers(potatoBridge.eglDisplay, potatoBridge.eglSurface);
|
||||||
|
printf("First frame error: %p\n", eglGetError());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return success == EGL_TRUE ? JNI_TRUE : JNI_FALSE;
|
return success == EGL_TRUE ? JNI_TRUE : JNI_FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user