From 7e81956daf1d5c81f6344e7f5509ae08947f8434 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 11 Nov 2011 07:35:43 +0100 Subject: OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl reparenting Test: enable NEWT 'onscreen' case --- src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m | 9 ++++++++- src/jogl/native/macosx/MacOSXWindowSystemInterface.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/jogl/native') diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m index f261e95b2..47f679fac 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m @@ -406,13 +406,20 @@ void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_ms) { timespec_now(&to_abs); timespec_addms(&to_abs, to_ms); wr = pthread_cond_timedwait(&l->renderSignal, &l->renderLock, &to_abs); + #ifdef DBG_SYNC + struct timespec t1, td; + timespec_now(&t1); + timespec_subtract(&td, &t1, &to_abs); + long td_ms = timespec_milliseconds(&td); + fprintf(stderr, "%ld ms", td_ms); + #endif } else { pthread_cond_wait (&l->renderSignal, &l->renderLock); } ready = !l->shallDraw; } } while (NO == ready && 0 == wr) ; - SYNC_PRINT("%d}", ready); + SYNC_PRINT("-%d}", ready); pthread_mutex_unlock(&l->renderLock); } diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.h b/src/jogl/native/macosx/MacOSXWindowSystemInterface.h index 763930e37..3625cfbde 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.h +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.h @@ -3,7 +3,7 @@ #import #import -#define VERBOSE_ON 1 +// #define VERBOSE_ON 1 #ifdef VERBOSE_ON // #define DBG_PRINT(...) NSLog(@ ## __VA_ARGS__) -- cgit v1.2.3