diff options
author | Sven Gothel <[email protected]> | 2011-11-06 08:08:28 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-06 08:08:28 +0100 |
commit | 368cbf4462d7f3635c1ef4497424c360b5ccc203 (patch) | |
tree | f1e7ac3b0ddfed9677a6e135bee27831d323cad6 /src/nativewindow/native | |
parent | 0038e2d41825c22bdd18a7b86a8229a3fab674a3 (diff) |
OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)
- attributes +NSOpenGLPFANoRecovery +NSOpenGLPFAAccelerated
- use SurfaceUpdateListener() to notify layer
- swapBufferImpl() adapt to 0038e2d41825c22bdd18a7b86a8229a3fab674a3
- pbuffer: don't enforce POT tex-size to surface size, but pbuffer only
- FIXME: Check POT pbuffer/tex-size for X11/Win32/.. !
-
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index 221eec393..55ec83279 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -177,7 +177,7 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_DestroyNSView0 JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AttachJAWTSurfaceLayer0 (JNIEnv *env, jclass unused, jobject jawtDrawingSurfaceInfoBuffer, jlong caLayer) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + JNF_COCOA_ENTER(env); JAWT_DrawingSurfaceInfo* dsi = (JAWT_DrawingSurfaceInfo*) (*env)->GetDirectBufferAddress(env, jawtDrawingSurfaceInfoBuffer); if (NULL == dsi) { NativewindowCommon_throwNewRuntimeException(env, "Argument \"jawtDrawingSurfaceInfoBuffer\" was not a direct buffer"); @@ -186,10 +186,10 @@ JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AttachJAWTSur CALayer* layer = (CALayer*) (intptr_t) caLayer; [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ id <JAWT_SurfaceLayers> surfaceLayers = (id <JAWT_SurfaceLayers>)dsi->platformInfo; - // FIXME: JAU: surfaceLayers.layer = [layer autorelease]; - surfaceLayers.layer = layer; + surfaceLayers.layer = [layer autorelease]; + // surfaceLayers.layer = layer; // FIXME: JAU }]; - [pool release]; + JNF_COCOA_EXIT(env); return JNI_TRUE; } |