views:

110

answers:

1

My application links against these Frameworks:

Cocoa.Framework
AppKit.Framework
CoreData.Framework
Foundation.Framework

Note that OpenGL.Framework is NOT linked. However, after setting DYLD_PRINT_LIBRARIES=1, I note that:

...

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/...

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/...

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/...

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/...

dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/...

...

This is a huge problem because, as noted on the [cocoa-dev list][1], the OpenGL framework causes the NVidia graphics card to power on for the newer MacBook Pros.

As expected, my application causes the NVidia card to power on. What's worse, is that the framework does not unload when the window is closed.

The only non-standard graphic elements I have are some custom NSBezierPath drawings and a shadow.

Essentially, when my app starts integrated graphics are used UNTIL the window is shown, and then discrete graphics are powered on and remain on regardless of the window state.


ANSWER

For an NSView with NSBezierPaths OR clear backgrounds, make sure to set: [myView setWantsLayer:NO]