LaurentGomila/SFML — Issue #161: Unable to create OpenGL context with antialiasing on OS X
Author: zerd
Created: 2012-01-24 22:19:52+00:00
State: open

I can't get antialiasing to work on OS X with SFML, although it works with e.g. GLFW.

```C++
#include
#include
#include

int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window", sf::Style::Close, sf::ContextSettings(24,8,4,3,2));
std::cout << "Antialiasing level: " << window.GetSettings().AntialiasingLevel << std::endl;
window.SetFramerateLimit(60);

while (window.IsOpen()) {
sf::Event event;
while (window.PollEvent(event)) {
if (event.Type == sf::Event::Closed)
window.Close();
if ((event.Type == sf::Event::KeyPressed) && (event.Key.Code == sf::Keyboard::Escape))
window.Close();
}

window.Clear();
window.Display();
}
return EXIT_SUCCESS;
}
```

Output:
```
2012-01-24 23:14:48.549 sfml-aa.app[52359:903] invalid share context
2012-01-24 23:14:48.552 sfml-aa.app[52359:903] invalid context
Error. Unable to create the context.
Failed to activate the window's context
Failed to activate the window's context
Failed to activate the window's context
Antialiasing level: 4
Failed to activate the window's context
Failed to activate the window's context
Failed to activate the window's context
Failed to activate the window's context
```