Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sf::Vector2u windowSize = window.getSize();
- sf::Texture texture;
- texture.create(windowSize.x, windowSize.y);
- texture.update(window);
- sf::Image screenshot = texture.copyToImage();
- screenshot.saveToFile("captured.png");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement