Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAOpenGLView and QCRenderer confusion



On May 18, 2008, at 9:18 PM, Dave Hayden wrote:

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



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >CAOpenGLView and QCRenderer confusion (From: Dave Hayden <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.