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: Quartzcomposer programming in C



Mark,

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.

More info here:
http://developer.apple.com/documentation/Cocoa/Conceptual/ CarbonCocoaDoc/index.html


Also look for QC related sample code at:
http://developer.apple.com/samplecode/GraphicsImaging/idxQuartz- date.html


For instance, this one could be of interest:
http://developer.apple.com/samplecode/QuartzComposerOffline/ QuartzComposerOffline.html


The best place to get help for your project for the Cocoa / C side is likely the Cocoa-dev mailing list.

Good luck!

PS: A good book to learn Obj-C is the one from Aaron Hillegass
http://bignerdranch.com/products/cocoa1.shtml

________________________________________________________
Pierre-Olivier Latour                            	email@hidden
Quartz Composer Team				Apple Computer, 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
References: 
 >Re: Quartzcomposer programming in C (From: Mark Gilbert <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.