diff options
author | James Cowgill <jcowgill@debian.org> | 2016-08-09 15:20:03 +0000 |
---|---|---|
committer | James Cowgill <jcowgill@debian.org> | 2016-08-09 15:20:03 +0000 |
commit | df93e238e30e97850d76ad5585b8ab9ad9c03e67 (patch) | |
tree | 2ae5f3305e1ee1882f563d2803f94aa6446dc367 /src/SFML/Window/OSX/SFContext.mm | |
parent | 301fd78b3ac87cf1fbce9d2c955db89094a304a5 (diff) |
Imported Upstream version 2.4.0+dfsg
Diffstat (limited to 'src/SFML/Window/OSX/SFContext.mm')
-rw-r--r-- | src/SFML/Window/OSX/SFContext.mm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/SFML/Window/OSX/SFContext.mm b/src/SFML/Window/OSX/SFContext.mm index 810bcb4..0970007 100644 --- a/src/SFML/Window/OSX/SFContext.mm +++ b/src/SFML/Window/OSX/SFContext.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2015 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2016 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. @@ -46,7 +46,7 @@ m_view(0), m_window(0) { // Ask for a pool. - retainPool(); + ensureThreadHasPool(); // Create the context createContext(shared, @@ -62,7 +62,7 @@ m_view(0), m_window(0) { // Ask for a pool. - retainPool(); + ensureThreadHasPool(); // Create the context. createContext(shared, bitsPerPixel, settings); @@ -83,7 +83,7 @@ m_window(0) WindowImplCocoa::setUpProcess(); // Ask for a pool. - retainPool(); + ensureThreadHasPool(); // Create the context. createContext(shared, VideoMode::getDesktopMode().bitsPerPixel, settings); @@ -108,8 +108,6 @@ SFContext::~SFContext() [m_view release]; // Might be nil but we don't care. [m_window release]; // Idem. - - releasePool(); } @@ -244,6 +242,9 @@ void SFContext::createContext(SFContext* shared, attrs.push_back((NSOpenGLPixelFormatAttribute)0); // end of array + // All OS X pixel formats are sRGB capable + m_settings.sRgbCapable = true; + // Create the pixel format. NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attrs[0]]; |