Re: QCCompositionLayer doesn't draw until window resized?
Re: QCCompositionLayer doesn't draw until window resized?
- Subject: Re: QCCompositionLayer doesn't draw until window resized?
- From: mike woodworth <email@hidden>
- Date: Tue, 17 Feb 2009 13:24:27 -0600
David,
I actually based this off that sample. As I said the code works fine
in a simple test harness such as that, so I assume it's somehow
related to this specific window. I was hoping someone might have
stumbled onto a similar hangup. For the record, I've now found the
problem, but I don't know why it's affecting me here and not in
simpler apps. I'm doing exactly what is done in CALayerEssentials,
here's my code:
NSString * compositionPath = [[NSBundle mainBundle]
pathForResource:@"lowerthird" ofType:@"qtz"];
exampleQCCompositionLayer = [QCCompositionLayer
compositionLayerWithFile:compositionPath];
[QCLayerView setLayer: exampleQCCompositionLayer];
composition = [exampleQCCompositionLayer composition];
NSLog(@"keys : %@", [exampleQCCompositionLayer inputKeys]);
[exampleQCCompositionLayer setFrame: NSRectToCGRect([QCLayerView
frame])]; //<---- this was the fix
The last line solves the problem, though I don't exactly understand
why it's necessary. Perhaps a bug, or perhaps there's a fundamental
part about this I'm not getting.
mike
--
Mike Woodworth
email@hidden
On Feb 17, 2009, at 12:51 PM, David Duncan wrote:
On Feb 16, 2009, at 4:10 PM, mike woodworth wrote:
I'm having a strange problem integrating a QCCompositionLayer into
an existing project. Everything on the window is OpenGLLayer
based, so I know the window is properly setup for layer backing.
In a stripped down project (with just this QCCompositionLayer on
the window) the app launches and the QC is displayed. But in this
app, the layer doesn't seem to draw until I resize the window.
It seems because QCCompositionLayer is async, I also cant force a
redraw via any of the setNeedDisplay style methods.
The CALayerEssentials sample operates without having to do anything
special with its QCCompositionLayer, so I would probably recommend
you start there to see if you can figure out what is going wrong.
CALayerEssentials <http://developer.apple.com/samplecode/CALayerEssentials/index.html
>
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden