Technical Q&A QA1218
How do I tell if a particular display is being hardware accelerated by Quartz Extreme?
Q: How do I tell if a particular display is being hardware accelerated by Quartz Extreme?
A: As of Mac OS X 10.2 (Jaguar), there is a new API in "CGDisplayConfiguration.h" called CGDisplayUsesOpenGLAcceleration
for just that purpose. "CGDisplayConfiguration.h" can be found in the Core Graphics framework (CoreGraphics.framework) which is part of the Application Services framework (ApplicationServices.framework).
Listing 1 Checking for OpenGL acceleration using CGDisplayUsesOpenGLAcceleration.
/* Prototype for CGDisplayUsesOpenGLAcceleration() */ |
/* |
CGDisplayUsesOpenGLAcceleration() takes a CGDirectDisplayID |
parameter and returns a boolean_t result |
*/ |
#include <ApplicationServices/ApplicationServices.h>; |
/* Code that cares whether or not the display is accelerated */ |
if ( CGDisplayUsesOpenGLAcceleration( displayID ) ) |
{ |
/* Provide full graphics */ |
} |
else |
{ |
/* Provide reduced graphics */ |
} |
Document Revision History
Date | Notes |
---|---|
2013-08-13 | Updated formatting. |
2002-12-04 | New document that describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not. |
Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-08-13