mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
fix antialiasing on OS X (close issue #161)
This commit is contained in:
parent
ac64a7c995
commit
918db11074
@ -37,6 +37,7 @@ namespace sf
|
|||||||
namespace priv
|
namespace priv
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
SFContext::SFContext(SFContext* shared)
|
SFContext::SFContext(SFContext* shared)
|
||||||
: myView(0), myWindow(0)
|
: myView(0), myWindow(0)
|
||||||
@ -68,6 +69,7 @@ SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
||||||
unsigned int width, unsigned int height)
|
unsigned int width, unsigned int height)
|
||||||
: myView(0), myWindow(0)
|
: myView(0), myWindow(0)
|
||||||
@ -175,7 +177,7 @@ void SFContext::CreateContext(SFContext* shared,
|
|||||||
// Prefer multisampling over supersampling
|
// Prefer multisampling over supersampling
|
||||||
attrs.push_back(NSOpenGLPFAMultisample);
|
attrs.push_back(NSOpenGLPFAMultisample);
|
||||||
|
|
||||||
// Only one buffer is currently available.
|
// Only one buffer is currently available
|
||||||
attrs.push_back(NSOpenGLPFASampleBuffers);
|
attrs.push_back(NSOpenGLPFASampleBuffers);
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)1);
|
attrs.push_back((NSOpenGLPixelFormatAttribute)1);
|
||||||
|
|
||||||
@ -183,8 +185,8 @@ void SFContext::CreateContext(SFContext* shared,
|
|||||||
attrs.push_back(NSOpenGLPFASamples);
|
attrs.push_back(NSOpenGLPFASamples);
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)settings.AntialiasingLevel);
|
attrs.push_back((NSOpenGLPixelFormatAttribute)settings.AntialiasingLevel);
|
||||||
|
|
||||||
// No software renderer
|
// No software renderer - only hardware renderer
|
||||||
attrs.push_back(NSOpenGLPFANoRecovery);
|
attrs.push_back(NSOpenGLPFAAccelerated);
|
||||||
}
|
}
|
||||||
|
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)0); // end of array
|
attrs.push_back((NSOpenGLPixelFormatAttribute)0); // end of array
|
||||||
|
Loading…
Reference in New Issue
Block a user