Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: CoreImage Accelerated or not How do I detect it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreImage Accelerated or not How do I detect it?



Santiago (Jacques) Lema wrote...

I need to handle things differently in my apps if CoreImage is accelerated by the GPU or not. However I found no simple solution to get whether yes or not it is supported. How does the "System informations" app get it's CoreImage acceleration info?


Currently I have setlled with checking if GL_EXT_ARB_fragment_program is available. But that would be true for a FX5200 which is too slow and not used in reality. Of course I still allow the user to chose what method he wants to use for display but I'd like to set a proper default.



So so far I just do this: const GLubyte* strExt = glGetString (GL_EXTENSIONS); const GLubyte* extname = (GLubyte*) "GL_EXT_ARB_fragment_program"; pixelShadersSupported = (BOOL)gluCheckExtension(extname, strExt);


Anything better, safer?

Yes another option would be to setup your state in such a manner that when you are ready to render your primitives you would call:


...

CGLGetParameter(CGLGetCurrentContext(), kCGLCPGPUVertexProcessing, &vp);
CGLGetParameter(CGLGetCurrentContext(), kCGLCPGPUFragmentProcessing, &fp);


if(!vp) { fprintf(stderr, "error: vertex processing isn't supported. \n"); }
if(!fp) { fprintf(stderr, "error: fragment processing isn't supported. \n"); }


...

Which would tell you whether the GPU will process (or is currently processing) via the programmable vertex and or fragment pipelines.

Max Rupp
OpenGL / Core Video Programming
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.