summaryrefslogtreecommitdiffstats
path: root/src/jogl/native/macosx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-11 07:35:43 +0100
committerSven Gothel <[email protected]>2011-11-11 07:35:43 +0100
commit7e81956daf1d5c81f6344e7f5509ae08947f8434 (patch)
treeac118f8062c9da59604cf69a7a2f5a4e9f84f091 /src/jogl/native/macosx
parentf0962124acf99a608f5e5e2f5f59fcb10f604403 (diff)
OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl reparenting
Test: enable NEWT 'onscreen' case
Diffstat (limited to 'src/jogl/native/macosx')
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m9
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.h2
2 files changed, 9 insertions, 2 deletions
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 <OpenGL/CGLTypes.h>
#import <jni.h>
-#define VERBOSE_ON 1
+// #define VERBOSE_ON 1
#ifdef VERBOSE_ON
// #define DBG_PRINT(...) NSLog(@ ## __VA_ARGS__)