First, let me explain what I'm trying to do: I've got two Quartz
Compositions, and I want to feed the rendered output of the first
one into the second, and have each in a CALayer. Also, the second
layer has a few output ports I want to get values from each frame.
Am I overlooking something more straightforward? QCCompositionLayer
doesn't appear to be flexible enough for this.
See the QCCompositionRenderer protocol. Its implemented by QCRenderer,
QCView, and QCCompositionLayer. It specifically gives you the
capabilities that your looking for to query and set ports.
One problem is I'm not very clear on what a GL context is. The
CAOpenGLLayer drawInCGLContext:::: callback gives me a CGLContextObj
to draw in, but QCRenderer needs the context on init. Should these
be the same context? I've tried returning the same context I gave to
the renderer in -[CAOpenGLLayer copyCGLContextForPixelFormat:] but
none of the CAOpenGLLayer methods are being called, even after
setNeedsDisplay.
If you end up going down this route, then I would recommend that you
override copyCGLContextForPixelFormat:, create your CGLContextObj
*and* create your QCRenderer there. Then you should be able to render
normally in drawInCGLContext::::. But I suspect you'll be able to use
the QCCompositionLayer after all :).
--
David Duncan
Apple DTS Animation and Printing
email@hidden