Fixed all the compiler warnings, fixed depreciated screenshot function

This commit is contained in:
2017-02-06 03:47:43 -08:00
parent 88e69721e1
commit 3571bdcd61
11 changed files with 19 additions and 20 deletions

View File

@@ -22,7 +22,6 @@
#include <OpenCL/cl_ext.h>
#endif
#pragma once
#include <iostream>
#include <chrono>
#include <SFML/Graphics.hpp>
@@ -233,7 +232,11 @@ int main() {
std::getline(std::cin, filename);
filename += ".png";
sf::Image image = window.capture();
sf::Texture window_texture;
window_texture.create(window.getSize().x, window.getSize().y);
window_texture.update(window);
sf::Image image = window_texture.copyToImage();
image.saveToFile(path + filename);
}