How can I get SFML to report the version of OpenGL that is being used by the render window?
Answer
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;
No comments:
Post a Comment