summaryrefslogtreecommitdiff
path: root/src/SFML/Window/OSX/SFContext.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFML/Window/OSX/SFContext.mm')
-rw-r--r--src/SFML/Window/OSX/SFContext.mm13
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]];