aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-26 15:49:59 +0100
committerSven Gothel <[email protected]>2011-11-26 15:49:59 +0100
commite02a1460018c7f32d7851dfdea41db551543122c (patch)
tree0df2ddc120868f808bdd730d48848287ef27457d /src/jogl
parent6fe980308f6042f7a3077b724d28f4c3719ba331 (diff)
OSX GLLayer (native): Remove CALayer add/remove/swap sublayer animation; Fix DestroyNSWindow0
The CALayer animations (add/remove/swap) confused somewhat rendering (layer position) and even triggered a deallocation sometimes.
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
index 47f679fac..34bf213ab 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
@@ -97,6 +97,11 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
pthread_mutex_init(&renderLock, NULL); // fast non-recursive
pthread_cond_init(&renderSignal, NULL); // no attribute
+ // no animations for add/remove/swap sublayers etc
+ [self removeAnimationForKey: kCAOnOrderIn];
+ [self removeAnimationForKey: kCAOnOrderOut];
+ [self removeAnimationForKey: kCATransition];
+
pbuffer = p;
[pbuffer retain];
@@ -201,6 +206,8 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
- (void)dealloc
{
DBG_PRINT("MyNSOpenGLLayer::dealloc.0 %p (refcnt %d)\n", self, (int)[self retainCount]);
+ // NSLog(@"MyNSOpenGLLayer::dealloc: %@",[NSThread callStackSymbols]);
+
[self disableAnimation];
[self deallocTex];
pthread_cond_destroy(&renderSignal);
@@ -229,7 +236,6 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
{
[context makeCurrentContext];
- // FIXME ?? [context update];
/**
* v-sync doesn't works w/ NSOpenGLLayer's context .. well :(
@@ -261,13 +267,6 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
CGRect lRect = [self frame];
DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p frame0: %lf/%lf %lfx%lf\n",
self, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height);
- if(lRect.origin.x<0 || lRect.origin.y<0) {
- lRect.origin.x = 0;
- lRect.origin.y = 0;
- [self setFrame: lRect];
- DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p frame*: %lf/%lf %lfx%lf\n",
- self, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height);
- }
}
glBindTexture(textureTarget, textureID);