2012-09-18 67 views

回答

2

用sf :: RenderWindow創建一個OpenGL上下文,並使用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;