mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Merge ac78657967
into beaeb0d4af
This commit is contained in:
commit
006d2bfb2f
@ -159,6 +159,25 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
||||
|
||||
ADD_ATTR(NSOpenGLPFAAccelerated);
|
||||
ADD_ATTR(NSOpenGLPFAClosestPolicy);
|
||||
|
||||
// Enables the context to participate in automatic graphics card switching.
|
||||
// This means that GLFW won't force switching to the discrete graphics
|
||||
// card on any Mac that has dual graphics cards available.
|
||||
// This will result in lower power consumption for GUI-style apps where
|
||||
// the integrated graphics are more than adequate, but may be ignored
|
||||
// for heavier applications such as games, where the user most likely
|
||||
// wants to take advantage of the more powerful discrete graphics chip.
|
||||
|
||||
// For this functionality to actually be active, the Apps' Info.plist
|
||||
// file still needs to be edited to contain:
|
||||
// <key>NSSupportsAutomaticGraphicsSwitching</key><true/>
|
||||
// otherwise it continues with default behaviour of forced discrete gfx.
|
||||
|
||||
// Note that switching graphics chipsets also incurs a ~200ms penalty on
|
||||
// app startup, which is avoided by having this attribute set.
|
||||
// Further info:
|
||||
// https://developer.apple.com/library/mac/technotes/tn2229/_index.html
|
||||
ADD_ATTR(NSOpenGLPFAAllowOfflineRenderers);
|
||||
|
||||
if (ctxconfig->nsgl.offline)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user