Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
How can I optimize a Quartz Composer composition depending on the hardware it runs on?
Q: How can I optimize a Quartz Composer composition depending on the hardware it runs on?
A: Quartz Composer performances depends a lot on the video card it is running on, and when using a Quartz Composer composition on a various range of machines, it will end up running on more or less powerful video cards. It is fortunately possible to design compositions that adapt to this: Quartz Composer has this convenient "OpenGL Info" patch which returns various information about the OpenGL environment and therefor about the video card.
OpenGL Info can check for the type of the video card, its amount of VRAM and if it is able to run Core Image in hardware mode. By combining these informations with Logic and Conditional patches, whose outputs are connected to the "Enable" inputs of various consumer patches of the composition (consumer patches are the red ones in the workspace), one can dynamically enable / disable parts of the composition depending on the hardware capabilities.
In the following example, this fake composition uses a high-quality Core Image based visual effect on video cards that are able to run Core Image in hardware, and a simplified visual effect for others, ensuring a smooth frame rate in any case (the "Operation" of the Logic patch is set to "NOT"):
Document Revision History
Date | Notes |
---|---|
2014-03-06 | Explains how to design compositions that adapt to the hardware limitations. |
2005-06-01 | New document that explains how to design compositions that adapt to the hardware limitations. |
Copyright © 2005 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2005-06-01