From 368cbf4462d7f3635c1ef4497424c360b5ccc203 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 6 Nov 2011 08:08:28 +0100 Subject: 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/.. ! - --- src/nativewindow/native/macosx/OSXmisc.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nativewindow/native') 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 surfaceLayers = (id )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; } -- cgit v1.2.3