On Jun 10, 2013, at 10:03 PM, Miguel Pontes <miguelpon...@gmail.com> wrote:

> Hello,
> I'm having issues getting an app to not trigger switching to the dedicated 
> GPU when using NSOpenGLView.
[…]
> Is there anything I'm doing wrong? I've read on this mailing list before 
> (http://lists.apple.com/archives/cocoa-dev/2011/Mar/msg00795.html) that 
> specifying certain pixel formats could cause the discrete GPU to be 
> triggered, but I'n not even defining any pixel format when I'm initting the 
> NSOpenGLView, just a simple [super initWithFrame:frameRect].

No, you're not doing anything wrong. I was curious about this as well, and I 
noticed that, starting in 10.8.4, instantiating an IKImageBrowserView will not 
toggle the discrete GPU. So I tried to figure out what it was doing, and found 
it uses four pixel formats: NSOpenGLPFAAllowOfflineRenderers, 
NSOpenGLPFANoRecovery, NSOpenGLPFAAccelerated, and a mysterious pixel format 
identified as 1262.

The first three of the above are standard pixel formats, but the 1262 format 
doesn't appear to be documented anywhere. I found out that adding the 
undocumented pixel format in addition to the three above apparently prevents 
the discrete switch-over from happening. Since it's undocumented, the usual 
disclaimers apply: use it at your own risk, it may break in the future, and all 
that.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to