summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-15 03:31:34 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-15 03:31:34 +0200
commit442c8cdeffac21482540aeecefb9e7564166e681 (patch)
tree0ae920419eb7e6a7099692d5586b774bf694b83c /src
parent75bfa35a6d2f4e727f011e178a1d47d43f8ede71 (diff)
Anti aliasing, change shading
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
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");