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: qc from dashboard?



Odd ... I shuffled the code all around (in fact making my plugin a separate NSView that contains a QCView so I could wait till the main view was fully initialized and onscreen before setting up the QCView).  My stub NSView draws (just fills red), but as soon as I click the button to add the QCView, it fails with the invalid drawable error.  Incidentally all of these methods work fine in Safari-proper, so there must just be something funny about the way Dashboard works wrt OpenGL subviews.  No biggie -- this was just a "for fun" project.  If you're interesting in seeing the failing code (it's pretty small), let me know, though from what I can tell, this is Dashboard's fault, not QC's, so feel free to ignore it too :)

I remember now what the problem is (as I tried that myself some time ago): on top of the don't-start-rendering-before-the-widget-window-is-on-screen issue, there is some incompatibility between NSOpenGLContext, which the QCView uses a certain way, and Dashboard. That prevents using QCView inside Dashboard. You can fill a radar on the issue if you want.

Given what you have access to, the workaround is to create your own hw-accelerated NSOpenGLContext, which must be single-buffered, and set its view to the WebKit plugin view. Then create a QCRenderer from the .qtz file and with this NSOpenGLContext. Finallly, use the QCRenderer instead of the QCView as the _javascript_ object.

/Developer/Examples/Quartz Composer/Player is a sample code on how to use NSOpenGLContext and QCRenderer


________________________________________________________

Pierre-Olivier Latour                            email@hidden

Quartz Composer Architect                Graphic & Imaging Team


 _______________________________________________
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: 
 >qc from dashboard? (From: Mike Schrag <email@hidden>)
 >Re: qc from dashboard? (From: Pierre-Olivier Latour <email@hidden>)
 >Re: qc from dashboard? (From: Mike Schrag <email@hidden>)
 >Re: qc from dashboard? (From: Pierre-Olivier Latour <email@hidden>)
 >Re: qc from dashboard? (From: Pierre-Olivier Latour <email@hidden>)
 >Re: qc from dashboard? (From: Mike Schrag <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.