From 442c8cdeffac21482540aeecefb9e7564166e681 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 15 May 2021 03:31:34 +0200 Subject: Anti aliasing, change shading --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 0359622..12ac8eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,7 @@ int main() { texture.setSmooth(true); sf::Vector2u window_size = texture.getSize(); - sf::RenderWindow window(sf::VideoMode(window_size.x, window_size.y), "SFML works!", 0); + sf::RenderWindow window(sf::VideoMode(window_size.x, window_size.y), "SFML works!", 0, sf::ContextSettings(0, 0, 4)); window.setVerticalSyncEnabled(false); window.setFramerateLimit(0); @@ -65,7 +65,7 @@ int main() { sf::Image output_image; output_image.create(flag_width, flag_height, sf::Color::Transparent); - const float playtime_sec = 2.0f; + const float playtime_sec = 1.78f; const float frame_time = 1000.0 / (double)fps / 1000.0; double elapsed_frame_time = 0.0; @@ -93,6 +93,7 @@ int main() { break; } + window.close(); running = false; work_thread.join(); system("ffmpeg -i \"frames/%d.png\" -framerate 24 -filter_complex \"fps=24,split=2[palette_in][gif];[palette_in]palettegen[palette_out];[gif]fifo[gif_fifo]; [gif_fifo][palette_out]paletteuse\" -y output.gif"); -- cgit v1.2.3