OF 090 and Quartz Composition

Hy !

I’m trying to create an OF multi window app with a Quartz Composition player on OSX.

No problem with OF 084 and older, but with the new release and the deprecate of QTPlayer (vs AVFoundation…) i can’t import <Quartz/Quartz.h> in my header file without errors.

  • Is there a way, a hack, to use Quartz framework with OF 090 ?
  • Is Quartz and QT player definitely unsupported ?

Thanks :slight_smile:

Hi there!

I’m not able to help you that much, but from what I understood… Apple dropped Quartz a long time ago (2011?). And more recently, QT too, in favor of AVFoundation.

If you like Quartz, maybe Vuo can be a solution for you?

Thanks Hubris !

Some users like Quartz and have create a lot of compositions, so it’s stay a nice toy.

In fact, i’m think that QC is obsolete too, and I like Vuo, but I’m looking for a cross platform alternative (GLSL ? SWF ? …).

It depends how much dirty you want your hands to get. :slight_smile:

From Vuo’s website, I read they want it to be cross-platform: Mac, Windows, Linux, iOS and Android. Quite ambitious!

No problem with OF 084 and older, but with the new release and the deprecate of QTPlayer (vs AVFoundation…) i can’t import in my header file without errors.


asad

Are you hitting compile errors or just deprecation warnings?

asad ? …sorry don’t understand, i’m french :slight_smile:

I have compile erros, it’s impossible to import Quartz.h inside an OF header class without errors (NSruntime errors and others…)

About Vuo, I hope they are able to run it cross platform, but I think it’s not for tomorrow.

Ahh ok, the Quartz Composer API is Objective-C, while OF apps are primarily C++. You will need to use Objective-C++ to bridge the two.

There are a few ways to accomplish this, you could compile your application as Objective-C++ (the Type can be changed in Xcode’s File Inspector) and integrate the APIs directly or wrap your QC use in Objective-C++ and expose an C++ API, leaving your primary application C++. Either way, you will likely need to use preprocessor directives to control your #import and #include statements and to handle forward declarations. There are bunch of examples of wrapping Objective-C APIs within the core OF and in addons, see @laserpilot’s ofxCoreImage and @joshuajnoble’s ofxBLEDevice to see how they handle it.

1 Like

@admsyn pointed out that ofBook has a chapter on ofxiOS written by @julapy that touches on mixing Objective-C and C++, please see ofBook > Advanced Topics > ofxiOS > Intro to Objective-C.

I have already try with change type (to Objective C) without success.

I inquired about QC since my post and I realize that it is less used so I do not do it a priority, but thanks for help.