mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 16:47:14 -04:00
[EGLBridge] back
This commit is contained in:
parent
049e7a5915
commit
0283f151a3
@ -65,6 +65,10 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglGetCurrentContext(JNIE
|
|||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglInit(JNIEnv* env, jclass clazz) {
|
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, jlong window) {
|
||||||
static const EGLint ctx_attribs[] = {
|
static const EGLint ctx_attribs[] = {
|
||||||
EGL_CONTEXT_CLIENT_VERSION, 2,
|
EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
@ -149,14 +153,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglInit(JNIEnv* env, j
|
|||||||
// assert(val >= 2);
|
// assert(val >= 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return JNI_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* env, jclass clazz, jlong window) {
|
|
||||||
printf("EGLBridge: Making current\n");
|
printf("EGLBridge: Making current\n");
|
||||||
printf("EGLBridge: ThreadID=%d, WindowID=%p\n", gettid(), window);
|
printf("EGLBridge: ThreadID=%d, WindowID=%p\n", gettid(), window);
|
||||||
printf("EGLBridge: EGLContext=%p, EGLDisplay=%p, EGLSurface=%p\n",
|
printf("EGLBridge: EGLContext=%p, EGLDisplay=%p, EGLSurface=%p\n",
|
||||||
window==0 ? EGL_NO_CONTEXT : potatoBridge.eglContext,
|
/* window==0 ? EGL_NO_CONTEXT : */ potatoBridge.eglContext,
|
||||||
potatoBridge.eglDisplay,
|
potatoBridge.eglDisplay,
|
||||||
potatoBridge.eglSurface
|
potatoBridge.eglSurface
|
||||||
);
|
);
|
||||||
@ -165,7 +165,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
|||||||
potatoBridge.eglDisplay,
|
potatoBridge.eglDisplay,
|
||||||
potatoBridge.eglSurface,
|
potatoBridge.eglSurface,
|
||||||
potatoBridge.eglSurface,
|
potatoBridge.eglSurface,
|
||||||
window==0 ? EGL_NO_CONTEXT : potatoBridge.eglContext
|
/* window==0 ? EGL_NO_CONTEXT : */ potatoBridge.eglContext
|
||||||
);
|
);
|
||||||
if (success == EGL_FALSE) {
|
if (success == EGL_FALSE) {
|
||||||
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
|
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user