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: Fastest way to feed QC back into a Core Image



Since this subject keeps popping up (I just read of the upcoming sample code) I wanted to confirm that the following approach worked beautifully (thanks Pierre):


- attach a QCRenderer to a Pbuffer-based CGLContext
- create a CVOpenGLBuffer and attach the CGLContext to it (not clear from CV docs as to what happens when you attach though)
- create the CIImage using the constructor that takes a CVImageBuffer



Sounds a good approach - you can actually render directly the composition in a CVOpenGLBuffer, which is a subclass of CVImageBuffer, using a QCRenderer. See /Developer/Examples/Quartz Composer/Performer.



What's even better is that if you clear your GL context to transparent black, render the composition to it and then create the CIImage from it, the CIImage will correctly preserve the alpha information in the buffer, so I guess the CIImage is really just being wrapped around the surface texture behind the scenes. Because everything stays on the videocard (unless you're the lucky owner of a GeForce FX5200 :-P), this approach is also quite inexpensive...


Gabe
_______________________________________________
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: 
 >Fastest way to feed QC back into a Core Image (From: Gabriele de Simone <email@hidden>)
 >Re: Fastest way to feed QC back into a Core Image (From: Pierre-Olivier Latour <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.