6
\$\begingroup\$

How can I get SFML to report the version of OpenGL that is being used by the render window?

\$\endgroup\$

1 Answer 1

7
\$\begingroup\$

Create an OpenGL context with sf::RenderWindow and get the context settings with window.getSettings().

sf::RenderWindow window(sf::VideoMode(800, 600, 32), "SFML OpenGL");
sf::ContextSettings settings = window.getSettings();
std::cout << "OpenGL version:"<< settings.majorVersion << "." << settings.minorVersion << std::endl;
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .