Fixed all the compiler warnings, fixed depreciated screenshot function
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include "Camera.h"
|
||||
#include "Pub_Sub.h"
|
||||
|
||||
@@ -201,4 +200,4 @@ sf::Vector3f Camera::get_position() {
|
||||
|
||||
sf::Vector2f Camera::get_direction() {
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ int Hardware_Caster::init() {
|
||||
return error;
|
||||
}
|
||||
|
||||
srand(NULL);
|
||||
srand(time(NULL));
|
||||
|
||||
int *seed_memory = new int[1920*1080];
|
||||
|
||||
@@ -893,4 +893,4 @@ bool Hardware_Caster::assert(int error_code, std::string function_name) {
|
||||
|
||||
std::cout << err_msg << " =at= " << function_name << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include "LightController.h"
|
||||
|
||||
//LightController::LightController(std::shared_ptr<RayCaster> raycaster) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "LightHandle.h"
|
||||
|
||||
#include "LightController.h"
|
||||
|
||||
LightHandle::LightHandle() {
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <SFML/System/Vector3.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
@@ -369,4 +368,4 @@ void Old_Map::diamond_square(int stepsize, double scale) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "Event.hpp"
|
||||
#include "Pub_Sub.h"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <iostream>
|
||||
#include "Map.h"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user