As written in this Technical Q&A:
By default, once your application creates an OpenGL context (by either calling OpenGL directly or an API that reli
On late 2008 MacBook Pros, unfortunately, there is nothing we can do to avoid the switching to the discrete GPU.
On 2011 MacBook Pros, instead, the automatic switch can be prevented inserting the NSSupportsAutomaticGraphicsSwitching
key with a Boolean value of true
inside the Info.plist file. Note that this only works starting with Mac OS X Lion.