From ebcd7a6911551161e5bde5261b6ddaf8f65618c4 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 1 Sep 2019 20:30:56 +0100 Subject: [PATCH] Add comment to the flushBuffer/glFlush call on macOS --- gl-natives/src/main/c/jaggl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index 4c97c75835..015062bd04 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -699,6 +699,11 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_swapBuffers(JNIEnv *env, jclass cl #elif defined(_WIN32) result = (jboolean) SwapBuffers(jaggl_device); #elif defined(__APPLE__) && defined(__MACH__) + /* + * This buffer swap isn't strictly necessary (in fact, I'm not sure if we + * need to double buffer at all on macOS), but it is useful when the + * offscreen window is displayed for debugging purposes. + */ if (jaggl_double_buffered) { [jaggl_context_appkit flushBuffer]; } else {