Mailing Lists: Apple Mailing Lists

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

CAOpenGLView and QCRenderer confusion



From what I've read so far in docs and mailing lists, it sounds like it should be a pretty simple thing to do what QCCompositionLayer does: just subclass CAOpenGLView and drive a QCRenderer with the display link to get the frames of the composition. The details, unfortunately, are eluding me, and I haven't found any sample code that comes near to this.

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.

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.

The Performer example is really, really close to where I'm trying to go, but it renders into a view. If only NSOpenGLContext had a setLayer: method, I think I'd be home free!

Hoping someone can give me a nudge in the right direction. I'm sure it's something simple, I just haven't gotten my head around this GL stuff. Thanks for the help!

-Dave
Panic, Inc.

_______________________________________________
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


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.