What you need to do is set up your Quartz Comp into a cocoa app which
runs its QC renderer within a NSWindow that is a BorderLessWindow, and
you have to set up your pixel format and openGL state yourself, and
you have to make sure that:
Your window is BackingStoreBuffered, it is not opaque , its background
color is [NSColor clearColor], set your glClearColor to transparent
(0.0, 0.0, 0.0, 0.0) most importantly, you set your NSOpenGLContext's
parameter NSOpenGLCPSurfaceOpacity to 0. Then set your window Level to
kCGDesktopWindowLevel.
Here is an example project which demonstrates this. I needed to get
this working, and decided to hack at it for both of us. As a bonus, I
also enabled multisampled antialiasing, which makes this cube look so
much sexyier. :)
to switch out to your composition you can simply replace the included
cube compiosition with one named the same (mainComposition).
Feel free to use the code however you wish - I have to say, desktop
level transparent, antialiased QC comps are kind of fucking hot..... :)
On May 15, 2008, at 9:00 PM, Memo Akten wrote:
Hi all, I'm looking to see if its possible to create a cocoa app
which runs a Quartz Composition but without any window chrome and
transparent. I know enough about xcode / interface builder to create
a cocoa app and embed a QC in it and control it. But what I would
like is to create an app which is ONLY my Quartz Composition without
any system chrome, and sits directly on the desktop with full
transparency where the QC patch is transparent. I've looked through
the documentation but couldn't find anything. Found an example
DesktopRender which looks like it has potential but couldn't see
where the magic actually happens. Any suggestions on the matter
would be welcome,
_______________________________________________
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