int main(int argc, char *argv[])
{
sf::ContextSettings settings;
//4.1 context
settings.majorVersion = 4;
settings.minorVersion = 1;
//You can also set different flag (core|compability|debug)
settings.attributeFlags = sf::ContextSettings::Debug | sf::ContextSettings::Core;
sf::Window({800, 600}, "Test", sf::Style::Default, settings);
}
This creates a 4.1 context, and if 4.1 is not available it should create the "nearest" one.
But keep in mind, sfml-graphics won't gain any advantage of a higher context version, and especially on linux (mesa) drivers don't like compability 3.X+ contexts, and when you use a core context sfml-graphics won't work anymore!
And also will SFML stop using fixed pipeline sometime?
Yes I think so, but don't expect it in the near future, soon
TM AlexAUT