Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.                     sf::Vector2u windowSize = window.getSize();
  2.                     sf::Texture texture;
  3.                     texture.create(windowSize.x, windowSize.y);
  4.                     texture.update(window);
  5.                     sf::Image screenshot = texture.copyToImage();
  6.                     screenshot.saveToFile("captured.png");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement