I saw someone else post the same request yesterday, and I wanted to
get some clarification on the options.
- We are developing a fairly large app, which as a part of its
functionality, needs to be able to open, render and control Quartz
Composer compositions (from within our app)
- Its vitally important that we get good dynamic control over the
elements of the composition in real time
- We need to write this app in C. The whole of the rest of the
code base for this large app is already C.
So, my questions:
1) Is it possible to play Quartz Composer compositions using C
(perhaps via QuickTime). If so, how do we discover and control the
published inputs
2) If not, what is needed to call the Objective C stuff from C.
Our experience with Cocoa is very limited.
We need to determine the best way to add controlled Quartz Composer
playback to an app which is basically all C.
QuickTime won't get you what you want.
You can mix Obj-C and C code (just be aware of the autorelease pool -
see http://developer.apple.com/documentation/Cocoa/Conceptual/
CarbonCocoaDoc/Articles/WrapperFunctions.html#//apple_ref/doc/uid/
20002398) , so you can use the QC APIs from inside C code. For
simplicity, you should just build the QC functionality entirely in
Obj-C and have just a few C entry points to call from the rest of the
app.
If your app needs to present QC rendering in the UI, you will need a
Cocoa front end and use the QCView. Otherwise, you can just use the
QCRenderer API. Note that in case of the QCRenderer API, it still
needs Cocoa around to create the OpenGL context needed for rendering.