6
\$\begingroup\$

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

\$\endgroup\$
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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.